Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions builds/win32/msvc15/engine_static.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
<ClCompile Include="..\..\..\src\jrd\blb.cpp" />
<ClCompile Include="..\..\..\src\jrd\blob_filter.cpp" />
<ClCompile Include="..\..\..\src\jrd\BlobUtil.cpp" />
<ClCompile Include="..\..\..\src\jrd\BulkInsert.cpp" />
<ClCompile Include="..\..\..\src\jrd\btn.cpp" />
<ClCompile Include="..\..\..\src\jrd\btr.cpp" />
<ClCompile Include="..\..\..\src\jrd\builtin.cpp" />
Expand Down Expand Up @@ -241,6 +242,7 @@
<ClInclude Include="..\..\..\src\jrd\blf_proto.h" />
<ClInclude Include="..\..\..\src\jrd\blob_filter.h" />
<ClInclude Include="..\..\..\src\jrd\BlobUtil.h" />
<ClInclude Include="..\..\..\src\jrd\BulkInsert.h" />
<ClInclude Include="..\..\..\src\jrd\blp.h" />
<ClInclude Include="..\..\..\src\jrd\btn.h" />
<ClInclude Include="..\..\..\src\jrd\btr.h" />
Expand Down
6 changes: 6 additions & 0 deletions builds/win32/msvc15/engine_static.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@
<ClCompile Include="..\..\..\src\jrd\BlobUtil.cpp">
<Filter>JRD files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\jrd\BulkInsert.cpp">
<Filter>JRD files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\jrd\btn.cpp">
<Filter>JRD files</Filter>
</ClCompile>
Expand Down Expand Up @@ -719,6 +722,9 @@
<ClInclude Include="..\..\..\src\jrd\BlobUtil.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\jrd\BulkInsert.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\jrd\blp.h">
<Filter>Header files</Filter>
</ClInclude>
Expand Down
38 changes: 26 additions & 12 deletions src/burp/restore.epp
Original file line number Diff line number Diff line change
Expand Up @@ -13503,6 +13503,8 @@ bool WriteRelationMeta::prepareBatch(BurpGlobals* tdgbl)

void WriteRelationMeta::prepareRequest(BurpGlobals* tdgbl)
{
const bool use_bulk_insert = (tdgbl->runtimeODS >= DB_VERSION_DDL14);

m_batchMode = false;
m_inMgsNum = 0;

Expand Down Expand Up @@ -13657,18 +13659,27 @@ void WriteRelationMeta::prepareRequest(BurpGlobals* tdgbl)
add_byte(blr, blr_loop);
add_byte(blr, blr_receive);
add_byte(blr, 0);
if (identity_type == IDENT_TYPE_ALWAYS)

if (!use_bulk_insert)
{
add_byte(blr, blr_store3);
add_byte(blr, blr_store_override_system);
if (identity_type == IDENT_TYPE_ALWAYS)
{
add_byte(blr, blr_store3);
add_byte(blr, blr_store_override_system);
}
else
add_byte(blr, blr_store);

// Mark this store operation as bulk one
add_byte(blr, blr_marks);
add_byte(blr, 1);
add_byte(blr, 0x10); // must be Jrd::StatementNode::MARK_BULK_INSERT
}
else
add_byte(blr, blr_store);

// Mark this store operation as bulk one
add_byte(blr, blr_marks);
add_byte(blr, 1);
add_byte(blr, 0x10); // must be Jrd::StatementNode::MARK_BULK_INSERT
{
add_byte(blr, blr_bulk_insert);
add_byte(blr, blr_null); // no source RSE
}

if (m_relation->rel_name.schema.hasData())
{
Expand Down Expand Up @@ -13710,8 +13721,11 @@ void WriteRelationMeta::prepareRequest(BurpGlobals* tdgbl)
}

add_byte(blr, blr_end);
if (identity_type == IDENT_TYPE_ALWAYS)
add_byte(blr, blr_null);
if (!use_bulk_insert)
{
if (identity_type == IDENT_TYPE_ALWAYS)
add_byte(blr, blr_null);
}
add_byte(blr, blr_end);
add_byte(blr, blr_eoc);

Expand Down Expand Up @@ -13811,7 +13825,7 @@ void WriteRelationReq::send(BurpGlobals* tdgbl, ITransaction* tran, bool lastRec
// memory when there are blobs and arrays fields - CORE-3802.

FbLocalStatus status;
if (m_resync || m_recs % 1000 == 1)
if (m_resync || ((m_recs % 1000 == 1) && !tdgbl->gbl_use_auto_release_temp_blobid))
m_request->startAndSend(&status, tran, 0, 0, m_inMsg.getCount(), m_inMsg.begin());
else
m_request->send(&status, 0, 0, m_inMsg.getCount(), m_inMsg.begin());
Expand Down
1 change: 1 addition & 0 deletions src/dsql/Nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,7 @@ class StmtNode : public DmlNode
{
TYPE_ASSIGNMENT,
TYPE_BLOCK,
TYPE_BULK_INSERT,
TYPE_COMPOUND_STMT,
TYPE_CONTINUE_LEAVE,
TYPE_CURSOR_STMT,
Expand Down
Loading
Loading