{"id":469833,"date":"2025-08-06T15:02:54","date_gmt":"2025-08-06T15:02:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=469833"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=469833","title":{"rendered":"<span>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 Firebird, \u0447\u0430\u0441\u0442\u044c 4<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/918552\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c, \u043a\u0430\u043a Firebird \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0434\u0438\u0441\u043a\u0430. \u0412\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/927374\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0442\u043e\u0440\u043e\u0439<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/931218\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0440\u0435\u0442\u044c\u0435\u0439<\/a> \u0447\u0430\u0441\u0442\u044f\u0445 \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f SELECT-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041d\u043e \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043d\u0435\u043e\u0442\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u043c \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u0430 \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c? \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>DPM_get()<\/strong> \u0438 <strong>DPM_fetch()<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0440\u0430\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <em>rpb-&gt;rpb_number<\/em>. \u041d\u043e \u043c\u044b \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b\u0438, \u043e\u0442\u043a\u0443\u0434\u0430 \u044d\u0442\u043e\u0442 rpb_number \u0431\u0435\u0440\u0451\u0442\u0441\u044f. \u042d\u0442\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u043c\u044b \u0437\u0430\u0439\u043c\u0451\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0441 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 RecordSource, VIO \u0438 DPM.<\/p>\n<h2>RecordSource<\/h2>\n<p>\u0412 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0441\u0442\u0435\u043a\u0442\u0440\u0435\u0439\u0441\u0430 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u0435 <strong>FullTableScan<\/strong>. \u041e\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0438 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/recsrc\/FullTableScan.cpp#L51\" rel=\"noopener noreferrer nofollow\"><strong>internalOpen()<\/strong><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<pre><code class=\"cpp\">void FullTableScan::internalOpen(thread_db* tdbb) const {  \u00a0 \u00a0 Database* const dbb = tdbb-&gt;getDatabase(); \u00a0 \u00a0 Attachment* const attachment = tdbb-&gt;getAttachment(); \u00a0 \u00a0 Request* const request = tdbb-&gt;getRequest(); \u00a0 \u00a0 Impure* const impure = request-&gt;getImpure&lt;Impure&gt;(m_impure);  \u00a0 \u00a0 impure-&gt;irsb_flags = irsb_open;  \u00a0 \u00a0 RLCK_reserve_relation(tdbb, request-&gt;req_transaction, m_relation, false);  \u00a0 \u00a0 record_param* const rpb = &amp;request-&gt;req_rpb[m_stream]; \u00a0 \u00a0 rpb-&gt;getWindow(tdbb).win_flags = 0;  \u00a0 \u00a0 \/\/ Unless this is the only attachment, limit the cache flushing \u00a0 \u00a0 \/\/ effect of large sequential scans on the page working sets of \u00a0 \u00a0 \/\/ other attachments \u00a0 \u00a0 if (attachment &amp;&amp; (attachment != dbb-&gt;dbb_attachments || attachment-&gt;att_next)) { \u00a0 \u00a0 \u00a0 \u00a0 BufferControl* const bcb = dbb-&gt;dbb_bcb; \u00a0 \u00a0 \u00a0 \u00a0 if (attachment-&gt;isGbak() || DPM_data_pages(tdbb, m_relation) &gt; bcb-&gt;bcb_count) { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 rpb-&gt;getWindow(tdbb).win_flags = WIN_large_scan; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 rpb-&gt;rpb_org_scans = m_relation-&gt;rel_scan_count++; \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 }  \u00a0 \u00a0 rpb-&gt;rpb_number.setValue(BOF_NUMBER);  \u00a0 \u00a0 if (m_dbkeyRanges.hasData()) { \u00a0 \u00a0 \u00a0 \u00a0 impure-&gt;irsb_lower.setValid(false); \u00a0 \u00a0 \u00a0 \u00a0 impure-&gt;irsb_upper.setValid(false);  \u00a0 \u00a0 \u00a0 \u00a0 EVL_dbkey_bounds(tdbb, m_dbkeyRanges, rpb-&gt;rpb_relation, \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 impure-&gt;irsb_lower, impure-&gt;irsb_upper); \u00a0 \u00a0 \u00a0 \u00a0 if (impure-&gt;irsb_lower.isValid()) { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 auto number = impure-&gt;irsb_lower.getValue(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 const auto ppages = rpb-&gt;rpb_relation-&gt;getPages(tdbb)-&gt;rel_pages; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 const auto maxRecno = (SINT64) ppages-&gt;count() * \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 dbb-&gt;dbb_dp_per_pp * dbb-&gt;dbb_max_records - 1;  \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 if (number &gt; maxRecno) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 number = maxRecno;  \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 rpb-&gt;rpb_number.setValue(number - 1); \/\/ position prior to the starting one \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 } }<\/code><\/pre>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c \u0442\u0443\u0442 \u0432\u043e\u0442 \u0447\u0442\u043e. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u043b\u0430\u0433 <em>irsb_open<\/em>. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <em>rpb<\/em> \u0438\u0437 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 <em>req_rpb<\/em>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <em>m_stream<\/em> \u043a\u0430\u043a \u043a\u043b\u044e\u0447. \u0421\u0442\u043e \u043f\u0443\u0434\u043e\u0432 <em>m_steam<\/em> &#8212; \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u0435, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <strong>RecordSource<\/strong> \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0418 \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435: <em> rpb-&gt;rpb_number.setValue(BOF_NUMBER)<\/em> , \u043f\u0440\u0438\u0447\u0451\u043c <em>BOF_NUMBER = -1<\/em> . \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e -1 , \u043c\u043e\u0436\u0435\u0442 \u043b\u044e\u0431\u043e\u0435 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442? \u0421\u043a\u043e\u0440\u043e \u0443\u0437\u043d\u0430\u0435\u043c. \u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0435\u043b\u0438 <em>irsb_lower<\/em> \u0438 <em>irsb_upper<\/em>, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <em>m_dbkeyRanges<\/em> \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041a\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/recsrc\/FullTableScan.cpp#L135\" rel=\"noopener noreferrer nofollow\"><strong>FullTableScan::internalGetRecord()<\/strong><\/a> \u044f \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043e\u043d \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043c\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0435\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0449\u0451 \u0440\u0430\u0437, \u043e\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0438 \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0435\u0433\u043e \u043f\u0440\u043e\u0449\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c.<\/p>\n<pre><code class=\"cpp\">bool FullTableScan::internalGetRecord(thread_db* tdbb) const { JRD_reschedule(tdbb);  Request* const request = tdbb-&gt;getRequest(); record_param* const rpb = &amp;request-&gt;req_rpb[m_stream]; Impure* const impure = request-&gt;getImpure&lt;Impure&gt;(m_impure);  if (!(impure-&gt;irsb_flags &amp; irsb_open)) { rpb-&gt;rpb_number.setValid(false); return false; }  const RecordNumber* upper = impure-&gt;irsb_upper.isValid() ? &amp;impure-&gt;irsb_upper : nullptr;  if (VIO_next_record(tdbb, rpb, request-&gt;req_transaction, request-&gt;req_pool, DPM_next_all, upper)) { rpb-&gt;rpb_number.setValid(true); return true; }  rpb-&gt;rpb_number.setValid(false); return false; }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <em>m_steam<\/em> \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 <strong>internalOpen()<\/strong> \u0438 <strong>internalGetRecord()<\/strong>, \u0438 <em>request<\/em> \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e <em>rpb<\/em> \u0431\u0443\u0434\u0435\u0442 \u0442\u0435\u043c \u0436\u0435 \u0441\u0430\u043c\u044b\u043c, \u0447\u0442\u043e \u0432 <strong>internalOpen()<\/strong>, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <em>rpb_number<\/em>. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u043b\u0430\u0433 <em>irsb_open<\/em> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d, \u0435\u0433\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b <strong>internalOpen()<\/strong>. \u041d\u0443 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>VIO_next_record()<\/strong>.<\/p>\n<p>\u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u043c\u044b \u0442\u0443\u0434\u0430 \u043f\u043e\u0439\u0434\u0451\u043c, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u0421\u0431\u043e\u0440\u043a\u0430 Firebird<\/h2>\n<p>\u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0443\u0447\u0430\u043b\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u043e \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c? \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432. \u041f\u043e\u043a\u0430 \u043c\u044b \u0435\u0449\u0451 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438, \u043d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c Firebird. \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0442\u043e\u043c \u043d\u0435 \u0442\u0430\u043a \u0441\u0442\u0440\u0430\u0448\u043d\u043e \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p><a href=\"https:\/\/www.firebirdsql.org\/en\/building-the-code\/\" rel=\"noopener noreferrer nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f<\/a> \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f. \u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c: \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u042f \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043d\u0430 Windows 10, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Visual Studio 2022. \u0412 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u0435\u043d <strong>sed<\/strong> , \u044d\u0442\u043e \u0447\u0438\u0441\u0442\u0430\u044f \u043f\u0440\u0430\u0432\u0434\u0430, \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f, \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <strong>make_all.bat<\/strong> \u0431\u0443\u0434\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0438\u0434\u0430 &#171;&#8230;&#8230;\\src\\dsql\\parse.cpp: No such file or directory&#187;. \u042f \u0432\u0437\u044f\u043b sed.exe \u0438\u0437 msys2, \u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0432 firebird\/builds\/win32 \u0435\u0433\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0435\u043c\u0443 dll-\u043a\u0430\u043c\u0438, \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u0431\u044b\u043b\u043e. \u041d\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 &#8212; \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 sed.exe \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 PATH \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0433\u0434\u0435 \u043e\u043d \u043b\u0435\u0436\u0438\u0442.<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0443\u043c\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c Firebird \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435?<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0443\u0436\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 .epp . \u042d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c, \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 .cpp \u0444\u0430\u0439\u043b\u044b \u0443\u0436\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a \u0432 .epp-\u0444\u0430\u0439\u043b\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u041d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0431\u0438\u043b\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d .cpp-\u0444\u0430\u0439\u043b, \u0438 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043c \u0442\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430.<\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u0431\u0438\u043b\u0434. \u041e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u043d\u0435 \u0432 \u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043e\u043d\u0430 \u0443 \u043d\u0430\u0441 \u0438 \u0442\u0430\u043a \u0435\u0441\u0442\u044c. \u0412 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u043c \u0431\u0438\u043b\u0434\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<ol>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044e <strong>devNodePrint()<\/strong> \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0443\u0437\u043b\u043e\u0432 StmtNode. \u0412 \u043d\u0435-\u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0445 \u0431\u0438\u043b\u0434\u0430\u0445 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442. \u0418\u043c\u0435\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u0447\u0435\u043c \u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c \u0432 VSCode.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c VIO \u0438 DPM \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c <strong>VIO_trace()<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 log-\u0444\u0430\u0439\u043b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u044d\u0442\u043e \u043c\u044b \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0438\u043c!<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u043b\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 &#171;make_boot.bat DEBUG&#187; , \u043f\u043e\u0442\u043e\u043c &#171;make_all.bat DEBUG&#187;. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u043d\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u043e\u0432\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u0448\u0430\u0433\u0438 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 security5.fdb, \u043d\u043e \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0449\u0435: \u043c\u043e\u0436\u043d\u043e \u0432 firebird.conf \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 SecurityDatabase \u043f\u0443\u0442\u044c \u043a \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 security5.fdb. \u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0435 \u0432\u0441\u0451 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0448\u0435\u0442\u0441\u044f: \u0438 \u0441\u0432\u0435\u0436\u0430\u044f security5.fdb, \u0438 \u0447\u0438\u0441\u0442\u044b\u0439 firebird.conf.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u043e\u0432\u044b\u0435 pdb-\u0444\u0430\u0439\u043b\u044b \u0441 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 temp\/x64\/debug\/engine\/engine13.pdb) \u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445 \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430.<\/p>\n<p>\u041e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f devNodePrint() \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434. \u041d\u0430 windows \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a: \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 firebird.exe &gt; output.log . \u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u0442\u0430\u0432\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e\u0447\u043a\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430 \u0432 EXE_looper(), \u0432 \u0441\u0442\u0440\u043e\u043a\u0435, \u0433\u0434\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f node-&gt;execute(), \u0438 \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u0430 \u0442\u043e\u0447\u043a\u0430 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 \u043f\u0438\u0448\u0435\u043c<\/p>\n<pre><code class=\"cpp\">devNodePrint((Jrd::DmlNode*)node)<\/code><\/pre>\n<p>\u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 output.log \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u043e\u0440\u0442\u044f\u043d\u043a\u0430 \u0441 \u0434\u0435\u0440\u0435\u0432\u043e\u043c \u0443\u0437\u043b\u043e\u0432, \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 gen \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b .cpp-\u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 .epp-\u0444\u0430\u0439\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0432 VSCode, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 gen, VSCode \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u0430\u044f \u0448\u0442\u0443\u043a\u0430, \u043d\u043e \u043d\u0430\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 settings.json \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 &#171;files.exclude&#187; \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433.<\/p>\n<p>\u0421 <strong>VIO_trace()<\/strong> \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 \u043f\u043e\u0440\u0430\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u044f \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 firebird.log! \u041f\u0440\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0447\u0442\u0435\u043d\u0438\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <em>vio_debug.h<\/em> \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 &#171;#define VIO_DEBUG&#187;. \u042f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0443, \u0438 \u0441\u043b\u043e\u0432\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 <em>vio.cpp<\/em>. \u0410\u0439-\u0430\u0439, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0430\u043c\u0438 \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e <strong>VIO_trace()<\/strong>, \u0438\u043d\u0430\u0447\u0435 \u0431\u044b \u0441\u043b\u043e\u0432\u0438\u043b\u0438. \u041b\u0430\u0434\u043d\u043e, \u043d\u0435 \u0431\u0435\u0434\u0430, \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b, \u0441\u043d\u043e\u0432\u0430 \u0441\u0431\u043e\u0440\u043a\u0430. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 <strong>make_boot.bat<\/strong> \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u043e \u0432 <strong>make_all.bat<\/strong> \u0432\u044b\u043b\u0435\u0437\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u043e \u043d\u0435\u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445 \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438. \u0427\u0451\u0440\u0442, \u044f \u043d\u0430\u0434\u0435\u044f\u043b\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435.<\/p>\n<p>\u0414\u043e \u043c\u0435\u043d\u044f \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u0434\u043e\u0448\u043b\u043e, \u0432 \u0447\u0451\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u042f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e .cpp-\u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 gen. \u0422\u0430\u043a \u0432\u043e\u0442, \u043f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f <strong>VIO_DEBUG<\/strong> \u0447\u0430\u0441\u0442\u044c \u044d\u0442\u0438\u0445 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043f\u0443\u0441\u0442\u044b\u043c\u0438. \u042d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435 <strong>make_boot.bat<\/strong>. \u042f \u043f\u043e\u043b\u0435\u0437 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c: \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <strong>gpre<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0430\u043c\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0447\u0443\u0442\u044c \u0440\u0430\u043d\u044c\u0448\u0435. \u041f\u0440\u0438 \u043a\u043e\u043f\u0430\u043d\u0438\u0438 \u0432 cmd-\u0444\u0430\u0439\u043b\u0430\u0445 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c echo \u0438 \u0443\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e @ \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438, \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u041f\u043e\u043d\u044f\u0432, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f <strong>gpre<\/strong>, \u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e, \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0451\u043b \u043f\u0443\u0441\u0442\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041d\u0443 \u0447\u0442\u043e \u0436\u0435, \u043c\u0430\u043b\u043e \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u043e\u0442\u043b\u0430\u0434\u043a\u0438 firebird, \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c gpre. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u0434\u0430\u0436\u0435 pdb-\u0444\u0430\u0439\u043b \u0441\u043e\u0437\u0434\u0430\u043b\u0441\u044f. \u041a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0435, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0427\u0435\u043c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u0435\u043d \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a, \u0442\u0430\u043a \u044d\u0442\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d \u043b\u043e\u0432\u0438\u0442 \u0432\u0441\u044f\u043a\u0438\u0435 \u0436\u0451\u0441\u0442\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0430\u043c. \u042f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u043b\u0441\u044f \u0432 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u043c\u043d\u0435 \u043d\u0430\u0441\u043a\u0443\u0447\u0438\u043b\u043e, \u044f \u0442\u0443\u043f\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0438 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u043b ACCESS VIOLATION. \u0425\u043e-\u0445\u043e, \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 .cpp-\u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f VIO, \u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>VIO_record()<\/strong> \u043f\u0440\u044f\u043c\u043e \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c <strong>VIO_trace()<\/strong> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e null-\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e. \u042f \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b \u043a\u043e\u0434 <strong>VIO_record()<\/strong>, \u0438 \u0442\u0430\u043c \u044f \u0434\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438 \u0443\u0431\u0440\u0430\u043b \u0432\u044b\u0437\u043e\u0432\u044b <strong>VIO_trace()<\/strong>, \u043f\u043e <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/vio.cpp#L3847\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a> \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0442 \u0442\u0443\u0442:<\/p>\n<pre><code class=\"cpp\">Record* VIO_record(thread_db* tdbb, record_param* rpb, const Format* format, MemoryPool* pool) { SET_TDBB(tdbb);  #ifdef VIO_DEBUG jrd_rel* relation = rpb-&gt;rpb_relation; VIO_trace(DEBUG_TRACE, \"VIO_record (rel_id %u, record_param %\" QUADFORMAT\"d, format %d, pool %p)\\n\", relation-&gt;rel_id, rpb-&gt;rpb_number.getValue(), format ? format-&gt;fmt_version : 0, (void*) pool); #endif<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0430\u0434\u0447\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>format<\/em> \u043d\u0435 null, \u0430 re<em>lation<\/em> \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 null. \u041b\u0430\u0434\u043d\u043e, \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u044d\u0442\u043e.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0451 \u0441\u043e\u0431\u0440\u0430\u043b\u043e\u0441\u044c, \u0438 \u044f \u0441\u043c\u043e\u0433 \u0441\u043e\u0437\u0435\u0440\u0446\u0430\u0442\u044c \u0432 firebird.log \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c VIO \u0438 DPM, \u043a\u0440\u0430\u0441\u043e\u0442\u0430! \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u043e \u0442\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043d\u0430\u0448\u0451\u043b, \u0437\u0430\u0432\u0451\u043b issue, \u0441\u043e\u0437\u0434\u0430\u043b <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/pull\/8678\" rel=\"noopener noreferrer nofollow\">PR \u0432 \u0432\u0435\u0442\u043a\u0443 5.0<\/a>, \u0438 \u0435\u0433\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u043d\u044f\u043b\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441, \u043f\u043e\u043c\u0438\u043c\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b VIO \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u041f\u043e\u0442\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>\u0410 gpre &#8212; \u0437\u0430\u0431\u0430\u0432\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430. \u0421\u0443\u0434\u044f \u043f\u043e \u043a\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u043b\u044c\u043a\u0430\u043b \u043f\u0435\u0440\u0435\u0434 \u043c\u043e\u0438\u043c\u0438 \u0433\u043b\u0430\u0437\u0430\u043c\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u043e\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0421, C++, Pascal, Ada \u0438 COBOL, \u0447\u0442\u043e-\u0442\u043e \u0438\u0437 \u0432\u043e\u0441\u044c\u043c\u0438\u0434\u0435\u0441\u044f\u0442\u044b\u0445. \u042f \u0443\u0432\u0435\u0440\u0435\u043d, \u0432 \u0441\u043a\u043e\u0440\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0442\u043a\u043d\u0451\u043c\u0441\u044f \u043d\u0430 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d.<\/p>\n<h2>VIO \u0438 DPM<\/h2>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u043e\u0434\u0443. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/vio.cpp#L3763\" rel=\"noopener noreferrer nofollow\"><strong>VIO_next_record()<\/strong><\/a> \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044f \u0443\u0431\u0440\u0430\u043b VIO_trace, \u0440\u0430\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0431\u0438\u0440\u0430\u043b debug build).<\/p>\n<pre><code class=\"cpp\">bool VIO_next_record(thread_db* tdbb, record_param* rpb, jrd_tra* transaction, MemoryPool* pool, FindNextRecordScope scope, const RecordNumber* upper) { \u00a0 \u00a0 SET_TDBB(tdbb); \u00a0 \u00a0 const USHORT lock_type = (rpb-&gt;rpb_stream_flags &amp; RPB_s_update) ? LCK_write : LCK_read;  \u00a0 \u00a0 do { \u00a0 \u00a0 \u00a0 \u00a0 if (!DPM_next(tdbb, rpb, lock_type, scope)) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return false; \u00a0 \u00a0 \u00a0 \u00a0 if (upper &amp;&amp; rpb-&gt;rpb_number &gt; *upper) { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CCH_RELEASE(tdbb, &amp;rpb-&gt;getWindow(tdbb)); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return false; \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 } while (!VIO_chase_record_version(tdbb, rpb, transaction, pool, false, false));    \u00a0 \u00a0 if (rpb-&gt;rpb_runtime_flags &amp; RPB_undo_data) \u00a0 \u00a0 \u00a0 \u00a0 fb_assert(rpb-&gt;getWindow(tdbb).win_bdb == NULL); \u00a0 \u00a0 else \u00a0 \u00a0 \u00a0 \u00a0 fb_assert(rpb-&gt;getWindow(tdbb).win_bdb != NULL);  \u00a0 \u00a0 if (pool &amp;&amp; !(rpb-&gt;rpb_runtime_flags &amp; RPB_undo_data)) { \u00a0 \u00a0 \u00a0 \u00a0 if (rpb-&gt;rpb_stream_flags &amp; RPB_s_no_data) { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CCH_RELEASE(tdbb, &amp;rpb-&gt;getWindow(tdbb)); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 rpb-&gt;rpb_address = NULL; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 rpb-&gt;rpb_length = 0; \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 \u00a0 else \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 VIO_data(tdbb, rpb, pool); \u00a0 \u00a0 } \u00a0 \u00a0 tdbb-&gt;bumpRelStats(RuntimeStatistics::RECORD_SEQ_READS, rpb-&gt;rpb_relation-&gt;rel_id); \u00a0 \u00a0 return true; }<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0446\u0438\u043a\u043b do\/while, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>DPM_next()<\/strong>, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u043c, \u0430 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>VIO_chase_record_version()<\/strong>. \u041a\u0430\u043a \u0436\u0435 \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438? \u041d\u0443, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 <em>rpb<\/em>, \u044d\u0442\u0430\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0432\u0441\u0435 \u0441\u043b\u0443\u0447\u0430\u0438.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/dpm.epp#L1677\" rel=\"noopener noreferrer nofollow\"><strong>DPM_next()<\/strong><\/a>. \u041a\u0430\u043a \u0436\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 dpm.cpp, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0439\u0442\u0438 \u0441\u044e\u0434\u0430 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u043e\u043c! \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0432\u0435\u0437\u0434\u043e\u0439 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u043c\u044b \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0451, \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u044f\u0441\u044c, \u043d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c. \u041d\u0430\u0447\u043d\u0451\u043c \u0436\u0435.<\/p>\n<pre><code class=\"cpp\">bool DPM_next(thread_db* tdbb, record_param* rpb, USHORT lock_type, FindNextRecordScope scope) { SET_TDBB(tdbb); Database* dbb = tdbb-&gt;getDatabase(); CHECK_DBB(dbb);  WIN* window = &amp;rpb-&gt;getWindow(tdbb); RelationPages* relPages = rpb-&gt;rpb_relation-&gt;getPages(tdbb);  if (window-&gt;win_flags &amp; WIN_large_scan) { \/\/ Try to account for staggered execution of large sequential scans. window-&gt;win_scans = rpb-&gt;rpb_relation-&gt;rel_scan_count - rpb-&gt;rpb_org_scans;  if (window-&gt;win_scans &lt; 1) window-&gt;win_scans = rpb-&gt;rpb_relation-&gt;rel_scan_count; } rpb-&gt;rpb_prior = NULL;  \/\/ Find starting point  rpb-&gt;rpb_number.increment();  USHORT slot, line; ULONG pp_sequence; rpb-&gt;rpb_number.decompose(dbb-&gt;dbb_max_records, dbb-&gt;dbb_dp_per_pp, line, slot, pp_sequence);  \/\/ If I'm a sweeper I don't need to look at swept pages. Also I should \/\/ check processed pages if they were swept.  const bool sweeper = (rpb-&gt;rpb_stream_flags &amp; RPB_s_sweeper); jrd_tra* transaction = tdbb-&gt;getTransaction(); const TraNumber oldest = transaction ? transaction-&gt;tra_oldest : 0;  if (sweeper &amp;&amp; (pp_sequence || slot) &amp;&amp; !line) { \/\/ The last record at previous data page was returned to caller. \/\/ It is time now to check if previous data page was swept.  const RecordNumber saveRecNo = rpb-&gt;rpb_number; rpb-&gt;rpb_number.decrement(); check_swept(tdbb, rpb); rpb-&gt;rpb_number = saveRecNo; }  ULONG dpSequence = rpb-&gt;rpb_number.getValue() \/ dbb-&gt;dbb_max_records; ULONG page_number = relPages-&gt;getDPNumber(dpSequence);  if (page_number) { fb_assert(window-&gt;win_page.getPageSpaceID() == relPages-&gt;rel_pg_space_id);  window-&gt;win_page = page_number; const data_page* dpage = (data_page*) CCH_FETCH(tdbb, window, lock_type, pag_undefined);  const bool pageOk = dpage-&gt;dpg_header.pag_type == pag_data &amp;&amp; !(dpage-&gt;dpg_header.pag_flags &amp; (dpg_secondary | dpg_orphan)) &amp;&amp; dpage-&gt;dpg_relation == rpb-&gt;rpb_relation-&gt;rel_id &amp;&amp; dpage-&gt;dpg_sequence == dpSequence &amp;&amp; (dpage-&gt;dpg_count &gt; 0);  if (pageOk) { for (; line &lt; dpage-&gt;dpg_count; ++line) { if (get_header(window, line, rpb) &amp;&amp; !(rpb-&gt;rpb_flags &amp; (rpb_blob | rpb_chained | rpb_fragment))) { if (sweeper &amp;&amp; !rpb-&gt;rpb_b_page &amp;&amp; !(rpb-&gt;rpb_flags &amp; rpb_deleted) &amp;&amp; rpb-&gt;rpb_transaction_nr &lt;= oldest) continue;  rpb-&gt;rpb_number.compose(dbb-&gt;dbb_max_records, dbb-&gt;dbb_dp_per_pp, line, slot, pp_sequence); return true; } } }  CCH_RELEASE(tdbb, window); }  \/\/ Find the next pointer page, data page, and record  while (true) { const pointer_page* ppage = get_pointer_page(tdbb, rpb-&gt;rpb_relation, relPages, window, pp_sequence, LCK_read); if (!ppage) BUGCHECK(249);\/\/ msg 249 pointer page vanished from DPM_next  for (; slot &lt; ppage-&gt;ppg_count;) { const ULONG page_number = ppage-&gt;ppg_page[slot]; const UCHAR* bits = (UCHAR*) (ppage-&gt;ppg_page + dbb-&gt;dbb_dp_per_pp); if (page_number &amp;&amp; !PPG_DP_BIT_TEST(bits, slot, ppg_dp_secondary) &amp;&amp; !PPG_DP_BIT_TEST(bits, slot, ppg_dp_empty) &amp;&amp; (!sweeper || !PPG_DP_BIT_TEST(bits, slot, ppg_dp_swept)) ) { dpSequence = ppage-&gt;ppg_sequence * dbb-&gt;dbb_dp_per_pp + slot; relPages-&gt;setDPNumber(dpSequence, page_number); const data_page* dpage = (data_page*) CCH_HANDOFF(tdbb, window, page_number, lock_type, pag_data);  for (; line &lt; dpage-&gt;dpg_count; ++line) { if (get_header(window, line, rpb) &amp;&amp; !(rpb-&gt;rpb_flags &amp; (rpb_blob | rpb_chained | rpb_fragment))) { if (sweeper &amp;&amp; !rpb-&gt;rpb_b_page &amp;&amp; !(rpb-&gt;rpb_flags &amp; rpb_deleted) &amp;&amp; rpb-&gt;rpb_transaction_nr &lt;= oldest) continue;  rpb-&gt;rpb_number.compose(dbb-&gt;dbb_max_records, dbb-&gt;dbb_dp_per_pp, line, slot, pp_sequence); return true; } }  \/\/ Prevent large relations from emptying cache. When scrollable \/\/ cursors are surfaced, this logic may need to be revisited.  if (window-&gt;win_flags &amp; WIN_large_scan) CCH_RELEASE_TAIL(tdbb, window); else if (window-&gt;win_flags &amp; WIN_garbage_collector &amp;&amp;  window-&gt;win_flags &amp; WIN_garbage_collect) { CCH_RELEASE_TAIL(tdbb, window); window-&gt;win_flags &amp;= ~WIN_garbage_collect; } else CCH_RELEASE(tdbb, window);  if (sweeper) { \/\/ The last record at data page was not returned to caller. \/\/ It is time now to check if this data page was swept.  const RecordNumber saveRecNo = rpb-&gt;rpb_number; rpb-&gt;rpb_number.compose(dbb-&gt;dbb_max_records, dbb-&gt;dbb_dp_per_pp, line, slot, pp_sequence);  rpb-&gt;rpb_number.decrement(); check_swept(tdbb, rpb); rpb-&gt;rpb_number = saveRecNo;  tdbb-&gt;checkCancelState(); }  if (scope == DPM_next_data_page) return false;  if (!(ppage = get_pointer_page(tdbb, rpb-&gt;rpb_relation, relPages, window, pp_sequence, LCK_read))) { BUGCHECK(249);\/\/ msg 249 pointer page vanished from DPM_next } }  if (scope == DPM_next_data_page) { CCH_RELEASE(tdbb, window); return false; }  slot++; line = 0; }  const UCHAR flags = ppage-&gt;ppg_header.pag_flags; pp_sequence++; slot = 0; line = 0;  if (window-&gt;win_flags &amp; WIN_large_scan) CCH_RELEASE_TAIL(tdbb, window); else CCH_RELEASE(tdbb, window);  if ((flags &amp; ppg_eof) || (scope != DPM_next_all)) return false; } }<\/code><\/pre>\n<p>\u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f <em>rpb-&gt;rpb_number.increment()<\/em> . \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 <strong>FullTableScan::internalOpen()<\/strong> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>rpb_number<\/em> \u0431\u044b\u043b\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 -1 , \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430 \u043e\u043d\u043e \u0441\u0442\u0430\u043d\u0435\u0442 0 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <em>rpb_number<\/em> &#8212; \u044d\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b: \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 (<em>pp_sequence<\/em>), \u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 (<em>slot<\/em>), \u0438 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (<em>line<\/em>). \u042d\u0442\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 <em>rpb_number.decompose()<\/em> , \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <em>slot<\/em>, <em>line<\/em> \u0438 <em>pp_sequence<\/em> \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0435\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445 <em>dbSequence<\/em>, \u043f\u043e\u0434\u0435\u043b\u0438\u0432 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <em>page_number<\/em> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f <em>relPages-&gt;getDPNumber(dpSequence)<\/em>. \u0417\u0430\u0434\u0435\u0440\u0436\u0438\u043c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0443\u0436\u043d\u0430\u044f \u043d\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/Relation.h#L113\" rel=\"noopener noreferrer nofollow\"><strong>RelationPages<\/strong><\/a>, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u0435\u0442\u043e\u0434\u044b <strong>getDPNumber()<\/strong> \u0438 \u0435\u0433\u043e \u0434\u0440\u0443\u0433 <strong>setDPNumber()<\/strong>:<\/p>\n<pre><code class=\"cpp\">struct DPItem { ULONG seqNum; ULONG physNum; ULONG mark;  static ULONG generate(const DPItem&amp; item) { return item.seqNum; } };  Firebird::SortedArray&lt;DPItem, Firebird::InlineStorage&lt;DPItem, MAX_DPMAP_ITEMS&gt;, ULONG, DPItem&gt; dpMap;  ULONG getDPNumber(ULONG dpSequence) { FB_SIZE_T pos; if (dpMap.find(dpSequence, pos)) { if (dpMap[pos].mark != dpMapMark) dpMap[pos].mark = ++dpMapMark; return dpMap[pos].physNum; }  return 0; }  void setDPNumber(ULONG dpSequence, ULONG dpNumber) { FB_SIZE_T pos; if (dpMap.find(dpSequence, pos)) { if (dpNumber) { dpMap[pos].physNum = dpNumber; dpMap[pos].mark = ++dpMapMark; } else dpMap.remove(pos); } else if (dpNumber) { dpMap.insert(pos, {dpSequence, dpNumber, ++dpMapMark});  if (dpMap.getCount() == MAX_DPMAP_ITEMS) freeOldestMapItems(); } }<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0435 <em>dpMap<\/em> &#8212; \u044d\u0442\u043e \u043f\u043b\u043e\u0441\u043a\u0430\u044f \u043c\u0430\u043f\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0430\u044f \u0432 \u0432\u0438\u0434\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 <strong>DPItem<\/strong>. \u041f\u043e\u043b\u044f \u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u043e\u0441\u0442\u044b\u0435: \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <em>seqNum<\/em>, \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <em>physNum<\/em> \u0438 \u043d\u0435\u043a\u0438\u0439 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <em>mark<\/em>. \u041a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0437\u0432\u0430\u043b \u044d\u0442\u0443 \u043c\u0430\u043f\u0443 \u043f\u043b\u043e\u0441\u043a\u043e\u0439, \u044f \u0438\u043c\u0435\u043b \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u0432 \u043d\u0435\u0439 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0438 \u043d\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439, \u043a\u043b\u044e\u0447\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 seqNum. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u0440\u0430\u043d\u043e \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u043e\u0442 \u0435\u0433\u043e \u0437\u0434\u0435\u0448\u043d\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"cpp\">bool find(const Key&amp; item, size_type&amp; pos) const  { fb_assert(sorted);  size_type highBound = this-&gt;count, lowBound = 0; while (highBound &gt; lowBound) { const size_type temp = (highBound + lowBound) &gt;&gt; 1; if (Cmp::greaterThan(item, KeyOfValue::generate(this-&gt;data[temp]))) lowBound = temp + 1; else highBound = temp; } pos = lowBound; return highBound != this-&gt;count &amp;&amp; !Cmp::greaterThan(KeyOfValue::generate(this-&gt;data[lowBound]), item); }<\/code><\/pre>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0432 <strong>DPM_next()<\/strong>. \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439\/\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <em>page_number<\/em> \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0432 <em>window-&gt;win_page<\/em>. \u0417\u0430\u0447\u0435\u043c? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <em>window<\/em> &#8212; \u044d\u0442\u043e \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u044f\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 DPM \u0438 VIO. \u0417\u0430\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0432\u044b\u0437\u0432\u0430\u0432 <strong>CCH_FETCH()<\/strong>, \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043b\u0435\u0436\u0438\u0442 \u0432 <em>window<\/em>.<\/p>\n<pre><code class=\"cpp\">pag* CCH_fetch(thread_db* tdbb, WIN* window, int lock_type, SCHAR page_type, int wait, const bool read_shadow) { SET_TDBB(tdbb);  const LockState lockState = CCH_fetch_lock(tdbb, window, lock_type, wait, page_type); BufferDesc* bdb = window-&gt;win_bdb; SyncType syncType = (lock_type &gt;= LCK_write) ? SYNC_EXCLUSIVE : SYNC_SHARED;  switch (lockState) { case lsLocked: CCH_fetch_page(tdbb, window, read_shadow);\/\/ must read page from disk if (syncType != SYNC_EXCLUSIVE) bdb-&gt;downgrade(syncType); break; case lsLatchTimeout: case lsLockTimeout: return NULL;\/\/ latch or lock timeout }  adjust_scan_count(window, lockState == lsLocked);  \/\/ Validate the fetched page matches the expected type if (bdb-&gt;bdb_buffer-&gt;pag_type != page_type &amp;&amp; page_type != pag_undefined) page_validation_error(tdbb, window, page_type);  return window-&gt;win_buffer; }<\/code><\/pre>\n<p>\u0413\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0437\u0430\u0447\u0438\u0442\u0430\u043b\u0430\u0441\u044c \u0432 <em>window-&gt;win_buffer<\/em>.<\/p>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0437\u0431\u043e\u0440 <strong>DPM_next()<\/strong>. \u0418\u043c\u0435\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u043f\u0440\u043e\u0445\u043e\u0434\u044f \u0432 \u0446\u0438\u043a\u043b\u0435 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 <em>line<\/em>. \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0443\u044e \u043d\u0430\u043c \u043f\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/918552\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/dpm.epp#L3255\" rel=\"noopener noreferrer nofollow\"><strong>get_header()<\/strong><\/a>, \u0441\u0430\u043c\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>window<\/em>, \u0430 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>line<\/em>. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>get_header()<\/strong> \u0437\u0430\u0447\u0438\u0442\u0430\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442 <em>rpb-&gt;rpb_flags<\/em>. \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u0440\u043e\u0448\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u0444\u043b\u0430\u0433\u0438 \u043d\u0430\u0441 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442, \u0442\u043e \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0446\u0438\u043a\u043b\u0435 \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a, \u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>line<\/em> \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e, \u0442\u043e <em>rpb_number<\/em>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0443\u0436\u0435 \u0441 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u0436\u0435 \u0441\u043f\u0430\u0442\u044c \u043e\u0442 \u0441\u043a\u0443\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0432\u0437\u0431\u043e\u0434\u0440\u0438\u0442\u044c\u0441\u044f, \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: \u0435\u0441\u043b\u0438 <strong>SortedArray::find()<\/strong> \u0432\u0435\u0440\u043d\u0451\u0442 <em>false<\/em>, \u0442\u043e \u0447\u0442\u043e \u0432\u0435\u0440\u043d\u0451\u0442 <strong>RelationPages::getDPNumber()<\/strong> \u043a\u0430\u043a \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b? <span class=\"habrahidden\">\u041e\u043d\u0430 \u0432\u0435\u0440\u043d\u0451\u0442 0, \u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u043d\u043e\u0440\u043c? \u0414\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c 0 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u0431\u0430\u0437\u044b \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442\u044c \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. <\/span>\u041f\u043e\u0447\u0435\u043c\u0443 \u044f \u043e\u0431 \u044d\u0442\u043e\u043c \u0441\u043f\u0440\u043e\u0441\u0438\u043b? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 <strong>DPM_next()<\/strong> \u0432 <em>relPages.dpMap<\/em> \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0441\u0442\u043e, \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a \u043d\u0435 \u0434\u0430\u0441\u0442 \u0441\u043e\u0432\u0440\u0430\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0451, \u0447\u0442\u043e \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u043f\u0440\u043e <strong>DPM_next()<\/strong>, \u0432\u0441\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0442\u043a\u0438 &#171;if (page_number)&#187; \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0432\u0442\u043e\u0440\u043e\u043c \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445, \u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043c\u044b \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u043c\u0441\u044f \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 <strong>DPM_next()<\/strong>.<\/p>\n<p>\u041c\u044b \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0435 80, \u0442\u0443\u0442 \u0432 \u0446\u0438\u043a\u043b\u0435 <em>while(true)<\/em> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0448\u0430\u0433\u043e\u0432. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u043c <em>get_pointer_page()<\/em> \u0437\u0430\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439. \u0414\u0430\u043b\u0435\u0435 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0438\u0434\u0451\u043c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 <em>slot<\/em>, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438. \u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0430\u043c \u043f\u043e\u0434\u043e\u0448\u043b\u0430, \u0442\u043e \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u043d\u0435\u0451, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435\/\u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <em>dpSequence<\/em> \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439, \u0432\u044b\u0437\u0432\u0430\u0432 <em>relPages-&gt;setDPNumber(dpSequence, page_number)<\/em> . \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u043e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0447\u0442\u0435\u043d\u0438\u044f\u0445 \u0441\u0442\u0440\u043e\u043a \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439, \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c <strong>DPM_next()<\/strong>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <em>relPages.dpMap<\/em> &#8212; \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043b\u0435\u043d\u0438\u0432\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043a\u0435\u0448 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438 \u0438 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438. \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043a\u0435\u0448\u0430 &#8212; \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f, \u0438 \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 MAX_DPMAP_ITEMS. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u0435\u0448 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0442\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446, \u0430 \u043d\u0435 \u0440\u0430\u0437\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0432\u043d\u0443\u0442\u0440\u0438. \u041d\u043e \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0432 \u0441\u0432\u043e\u0435\u0439 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443.<\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0446\u0438\u043a\u043b \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 <em>line<\/em>. \u042d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u0442\u043e\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: \u0437\u0430\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0444\u043b\u0430\u0433\u0438, \u0435\u0441\u043b\u0438 \u043d\u0430\u0448\u043b\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e, \u0442\u043e \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0430 \u043d\u0438 \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430, \u0442\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0444\u043b\u0430\u0433 <em>WIN_large_scan<\/em>, \u0435\u0441\u043b\u0438 \u043e\u043d \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d, \u0442\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430. \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043d\u0430\u0447\u0430\u043b\u0443 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u043f\u043e\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FullTableScan::internalOpen()<\/strong>, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0444\u043b\u0430\u0433 <em>WIN_large_scan<\/em> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446.<\/p>\n<p>\u0423 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>DPM_next()<\/strong> \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>scope<\/em>. \u041e\u0434\u043d\u043e \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <em>DPM_next_data_page<\/em> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043d\u0430\u0448 \u0441\u043b\u0443\u0447\u0430\u0439, \u0443 \u043d\u0430\u0441 <em>DPM_next_all<\/em> (\u0441\u043c. <strong>FullTableScan::internalGetRecord()<\/strong>, \u043a\u0430\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>VIO_next_record()<\/strong>). \u0412 \u043d\u0430\u0448\u0435\u043c \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0446\u0430 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f <em>slot<\/em> \u0438 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <strong>DPM_next()<\/strong> ? \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>true<\/em>, \u0435\u0441\u043b\u0438 \u043d\u0430\u0448\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0443, <em>false<\/em> \u0435\u0441\u043b\u0438 \u043d\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0435 <em>rpb-&gt;rpb_number<\/em> \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0435 <em>window-&gt;win_buffer<\/em> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0412 <em>rpb<\/em> \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0442\u0435 \u043f\u043e\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043b\u0430 <strong>get_header()<\/strong>, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <em>rpb_address<\/em> \u0438 <em>rpb_length<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0432 <strong>VIO_next_record()<\/strong> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0447\u0442\u043e <em>rpb-&gt;rpb_number<\/em> \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b \u0437\u0430\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0446\u0438\u043a\u043b \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u043d\u0435\u0442 \u0438\u043b\u0438 \u043e\u043d \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d, \u0442\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432  <strong>VIO_chase_record_version()<\/strong>.<\/p>\n<p>\u0417\u0430\u0431\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u043a\u043e\u0434 \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0435. \u042f \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0430\u043a \u0432\u043e\u0442, \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Firebird \u0441\u043e\u0437\u0434\u0430\u043b \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0443\u0441\u0442\u0443\u044e. \u041d\u0435 \u0436\u0430\u0434\u043d\u044b\u0439, \u0430 \u0434\u043e\u043c\u043e\u0432\u0438\u0442\u044b\u0439.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e <strong>FullTableScan<\/strong> \u0442\u0443\u043f\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a \u043e\u0442 0. \u0410 <strong>DPM_next()<\/strong> \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e \u043d\u043e\u043c\u0435\u0440\u043e\u0432, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 \u0432 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0437\u0430\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0435\u0451 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0451\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e, \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>\u041c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438: <strong>DPM_data_pages()<\/strong> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 <strong>FullTableScan::internalOpen()<\/strong>, <strong>get_pointer_page()<\/strong> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 <strong>DPM_next()<\/strong>. \u0418\u0445 \u0441\u043c\u044b\u0441\u043b \u0431\u044b\u043b \u043d\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u0435\u043d \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u044f\u0445.<\/p>\n<h2>\u0423\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f<\/h2>\n<ol>\n<li>\n<p>\u041c\u0430\u043f\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0414\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u044b\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0438 \u043f\u043e\u0438\u0441\u043a \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u043f\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0445\u043e\u0440\u043e\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u043c\u0430\u043f\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0430\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0442\u043e \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u044f \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438: <span class=\"habrahidden\">\u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u044d\u0442\u043e\u0433\u043e \u043a\u0435\u0448\u0430 \u0434\u043e 1. \u0428\u0443\u0442\u043a\u0430. \u0418\u0434\u0435\u044f \u0442\u0430\u043a\u0430\u044f: \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 dbSequence \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 seqNum, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0442\u043e \u043e\u0442\u043a\u0430\u0442 \u043d\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435.<\/span><\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/934668\/\"> https:\/\/habr.com\/ru\/articles\/934668\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/918552\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c, \u043a\u0430\u043a Firebird \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0434\u0438\u0441\u043a\u0430. \u0412\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/927374\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0442\u043e\u0440\u043e\u0439<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/931218\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0440\u0435\u0442\u044c\u0435\u0439<\/a> \u0447\u0430\u0441\u0442\u044f\u0445 \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f SELECT-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041d\u043e \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043d\u0435\u043e\u0442\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u043c \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u0430 \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c? \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>DPM_get()<\/strong> \u0438 <strong>DPM_fetch()<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0440\u0430\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <em>rpb-&gt;rpb_number<\/em>. \u041d\u043e \u043c\u044b \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b\u0438, \u043e\u0442\u043a\u0443\u0434\u0430 \u044d\u0442\u043e\u0442 rpb_number \u0431\u0435\u0440\u0451\u0442\u0441\u044f. \u042d\u0442\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u043c\u044b \u0437\u0430\u0439\u043c\u0451\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0441 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 RecordSource, VIO \u0438 DPM.<\/p>\n<h2>RecordSource<\/h2>\n<p>\u0412 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0441\u0442\u0435\u043a\u0442\u0440\u0435\u0439\u0441\u0430 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u0435 <strong>FullTableScan<\/strong>. \u041e\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0438 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/recsrc\/FullTableScan.cpp#L51\" rel=\"noopener noreferrer nofollow\"><strong>internalOpen()<\/strong><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<pre><code class=\"cpp\">void FullTableScan::internalOpen(thread_db* tdbb) const {  \u00a0 \u00a0 Database* const dbb = tdbb-&gt;getDatabase(); \u00a0 \u00a0 Attachment* const attachment = tdbb-&gt;getAttachment(); \u00a0 \u00a0 Request* const request = tdbb-&gt;getRequest(); \u00a0 \u00a0 Impure* const impure = request-&gt;getImpure&lt;Impure&gt;(m_impure);  \u00a0 \u00a0 impure-&gt;irsb_flags = irsb_open;  \u00a0 \u00a0 RLCK_reserve_relation(tdbb, request-&gt;req_transaction, m_relation, false);  \u00a0 \u00a0 record_param* const rpb = &amp;request-&gt;req_rpb[m_stream]; \u00a0 \u00a0 rpb-&gt;getWindow(tdbb).win_flags = 0;  \u00a0 \u00a0 \/\/ Unless this is the only attachment, limit the cache flushing \u00a0 \u00a0 \/\/ effect of large sequential scans on the page working sets of \u00a0 \u00a0 \/\/ other attachments \u00a0 \u00a0 if (attachment &amp;&amp; (attachment != dbb-&gt;dbb_attachments || attachment-&gt;att_next)) { \u00a0 \u00a0 \u00a0 \u00a0 BufferControl* const bcb = dbb-&gt;dbb_bcb; \u00a0 \u00a0 \u00a0 \u00a0 if (attachment-&gt;isGbak() || DPM_data_pages(tdbb, m_relation) &gt; bcb-&gt;bcb_count) { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 rpb-&gt;getWindow(tdbb).win_flags = WIN_large_scan; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 rpb-&gt;rpb_org_scans = m_relation-&gt;rel_scan_count++; \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 }  \u00a0 \u00a0 rpb-&gt;rpb_number.setValue(BOF_NUMBER);  \u00a0 \u00a0 if (m_dbkeyRanges.hasData()) { \u00a0 \u00a0 \u00a0 \u00a0 impure-&gt;irsb_lower.setValid(false); \u00a0 \u00a0 \u00a0 \u00a0 impure-&gt;irsb_upper.setValid(false);  \u00a0 \u00a0 \u00a0 \u00a0 EVL_dbkey_bounds(tdbb, m_dbkeyRanges, rpb-&gt;rpb_relation, \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 impure-&gt;irsb_lower, impure-&gt;irsb_upper); \u00a0 \u00a0 \u00a0 \u00a0 if (impure-&gt;irsb_lower.isValid()) { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 auto number = impure-&gt;irsb_lower.getValue(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 const auto ppages = rpb-&gt;rpb_relation-&gt;getPages(tdbb)-&gt;rel_pages; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 const auto maxRecno = (SINT64) ppages-&gt;count() * \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 dbb-&gt;dbb_dp_per_pp * dbb-&gt;dbb_max_records - 1;  \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 if (number &gt; maxRecno) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 number = maxRecno;  \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 rpb-&gt;rpb_number.setValue(number - 1); \/\/ position prior to the starting one \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 } }<\/code><\/pre>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c \u0442\u0443\u0442 \u0432\u043e\u0442 \u0447\u0442\u043e. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u043b\u0430\u0433 <em>irsb_open<\/em>. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <em>rpb<\/em> \u0438\u0437 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 <em>req_rpb<\/em>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <em>m_stream<\/em> \u043a\u0430\u043a \u043a\u043b\u044e\u0447. \u0421\u0442\u043e \u043f\u0443\u0434\u043e\u0432 <em>m_steam<\/em> &#8212; \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u0435, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <strong>RecordSource<\/strong> \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0418 \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435: <em> rpb-&gt;rpb_number.setValue(BOF_NUMBER)<\/em> , \u043f\u0440\u0438\u0447\u0451\u043c <em>BOF_NUMBER = -1<\/em> . \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e -1 , \u043c\u043e\u0436\u0435\u0442 \u043b\u044e\u0431\u043e\u0435 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442? \u0421\u043a\u043e\u0440\u043e \u0443\u0437\u043d\u0430\u0435\u043c. \u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0435\u043b\u0438 <em>irsb_lower<\/em> \u0438 <em>irsb_upper<\/em>, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <em>m_dbkeyRanges<\/em> \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041a\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/recsrc\/FullTableScan.cpp#L135\" rel=\"noopener noreferrer nofollow\"><strong>FullTableScan::internalGetRecord()<\/strong><\/a> \u044f \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043e\u043d \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043c\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0435\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0449\u0451 \u0440\u0430\u0437, \u043e\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0438 \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0435\u0433\u043e \u043f\u0440\u043e\u0449\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c.<\/p>\n<pre><code class=\"cpp\">bool FullTableScan::internalGetRecord(thread_db* tdbb) const { JRD_reschedule(tdbb);  Request* const request = tdbb-&gt;getRequest(); record_param* const rpb = &amp;request-&gt;req_rpb[m_stream]; Impure* const impure = request-&gt;getImpure&lt;Impure&gt;(m_impure);  if (!(impure-&gt;irsb_flags &amp; irsb_open)) { rpb-&gt;rpb_number.setValid(false); return false; }  const RecordNumber* upper = impure-&gt;irsb_upper.isValid() ? &amp;impure-&gt;irsb_upper : nullptr;  if (VIO_next_record(tdbb, rpb, request-&gt;req_transaction, request-&gt;req_pool, DPM_next_all, upper)) { rpb-&gt;rpb_number.setValid(true); return true; }  rpb-&gt;rpb_number.setValid(false); return false; }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <em>m_steam<\/em> \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 <strong>internalOpen()<\/strong> \u0438 <strong>internalGetRecord()<\/strong>, \u0438 <em>request<\/em> \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e <em>rpb<\/em> \u0431\u0443\u0434\u0435\u0442 \u0442\u0435\u043c \u0436\u0435 \u0441\u0430\u043c\u044b\u043c, \u0447\u0442\u043e \u0432 <strong>internalOpen()<\/strong>, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <em>rpb_number<\/em>. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u043b\u0430\u0433 <em>irsb_open<\/em> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d, \u0435\u0433\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b <strong>internalOpen()<\/strong>. \u041d\u0443 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>VIO_next_record()<\/strong>.<\/p>\n<p>\u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u043c\u044b \u0442\u0443\u0434\u0430 \u043f\u043e\u0439\u0434\u0451\u043c, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u0421\u0431\u043e\u0440\u043a\u0430 Firebird<\/h2>\n<p>\u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0443\u0447\u0430\u043b\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u043e \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c? \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432. \u041f\u043e\u043a\u0430 \u043c\u044b \u0435\u0449\u0451 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438, \u043d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c Firebird. \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0442\u043e\u043c \u043d\u0435 \u0442\u0430\u043a \u0441\u0442\u0440\u0430\u0448\u043d\u043e \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p><a href=\"https:\/\/www.firebirdsql.org\/en\/building-the-code\/\" rel=\"noopener noreferrer nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f<\/a> \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f. \u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c: \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u042f \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043d\u0430 Windows 10, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Visual Studio 2022. \u0412 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u0435\u043d <strong>sed<\/strong> , \u044d\u0442\u043e \u0447\u0438\u0441\u0442\u0430\u044f \u043f\u0440\u0430\u0432\u0434\u0430, \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f, \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <strong>make_all.bat<\/strong> \u0431\u0443\u0434\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0438\u0434\u0430 &#171;&#8230;&#8230;\\src\\dsql\\parse.cpp: No such file or directory&#187;. \u042f \u0432\u0437\u044f\u043b sed.exe \u0438\u0437 msys2, \u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0432 firebird\/builds\/win32 \u0435\u0433\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0435\u043c\u0443 dll-\u043a\u0430\u043c\u0438, \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u0431\u044b\u043b\u043e. \u041d\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 &#8212; \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 sed.exe \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 PATH \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0433\u0434\u0435 \u043e\u043d \u043b\u0435\u0436\u0438\u0442.<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0443\u043c\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c Firebird \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435?<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0443\u0436\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 .epp . \u042d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c, \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 .cpp \u0444\u0430\u0439\u043b\u044b \u0443\u0436\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a \u0432 .epp-\u0444\u0430\u0439\u043b\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u041d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0431\u0438\u043b\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d .cpp-\u0444\u0430\u0439\u043b, \u0438 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043c \u0442\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430.<\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u0431\u0438\u043b\u0434. \u041e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u043d\u0435 \u0432 \u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043e\u043d\u0430 \u0443 \u043d\u0430\u0441 \u0438 \u0442\u0430\u043a \u0435\u0441\u0442\u044c. \u0412 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u043c \u0431\u0438\u043b\u0434\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<ol>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044e <strong>devNodePrint()<\/strong> \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0443\u0437\u043b\u043e\u0432 StmtNode. \u0412 \u043d\u0435-\u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0445 \u0431\u0438\u043b\u0434\u0430\u0445 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442. \u0418\u043c\u0435\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u0447\u0435\u043c \u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c \u0432 VSCode.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c VIO \u0438 DPM \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c <strong>VIO_trace()<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 log-\u0444\u0430\u0439\u043b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u044d\u0442\u043e \u043c\u044b \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0438\u043c!<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u043b\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 &#171;make_boot.bat DEBUG&#187; , \u043f\u043e\u0442\u043e\u043c &#171;make_all.bat DEBUG&#187;. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u043d\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u043e\u0432\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u0448\u0430\u0433\u0438 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 security5.fdb, \u043d\u043e \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0449\u0435: \u043c\u043e\u0436\u043d\u043e \u0432 firebird.conf \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 SecurityDatabase \u043f\u0443\u0442\u044c \u043a \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 security5.fdb. \u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0435 \u0432\u0441\u0451 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0448\u0435\u0442\u0441\u044f: \u0438 \u0441\u0432\u0435\u0436\u0430\u044f security5.fdb, \u0438 \u0447\u0438\u0441\u0442\u044b\u0439 firebird.conf.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u043e\u0432\u044b\u0435 pdb-\u0444\u0430\u0439\u043b\u044b \u0441 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 temp\/x64\/debug\/engine\/engine13.pdb) \u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445 \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430.<\/p>\n<p>\u041e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f devNodePrint() \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434. \u041d\u0430 windows \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a: \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 firebird.exe &gt; output.log . \u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u0442\u0430\u0432\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e\u0447\u043a\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430 \u0432 EXE_looper(), \u0432 \u0441\u0442\u0440\u043e\u043a\u0435, \u0433\u0434\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f node-&gt;execute(), \u0438 \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u0430 \u0442\u043e\u0447\u043a\u0430 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 \u043f\u0438\u0448\u0435\u043c<\/p>\n<pre><code class=\"cpp\">devNodePrint((Jrd::DmlNode*)node)<\/code><\/pre>\n<p>\u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 output.log \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u043e\u0440\u0442\u044f\u043d\u043a\u0430 \u0441 \u0434\u0435\u0440\u0435\u0432\u043e\u043c \u0443\u0437\u043b\u043e\u0432, \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 gen \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b .cpp-\u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 .epp-\u0444\u0430\u0439\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0432 VSCode, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 gen, VSCode \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u0430\u044f \u0448\u0442\u0443\u043a\u0430, \u043d\u043e \u043d\u0430\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 settings.json \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 &#171;files.exclude&#187; \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433.<\/p>\n<p>\u0421 <strong>VIO_trace()<\/strong> \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 \u043f\u043e\u0440\u0430\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u044f \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 firebird.log! \u041f\u0440\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0447\u0442\u0435\u043d\u0438\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <em>vio_debug.h<\/em> \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 &#171;#define VIO_DEBUG&#187;. \u042f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0443, \u0438 \u0441\u043b\u043e\u0432\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 <em>vio.cpp<\/em>. \u0410\u0439-\u0430\u0439, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0430\u043c\u0438 \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e <strong>VIO_trace()<\/strong>, \u0438\u043d\u0430\u0447\u0435 \u0431\u044b \u0441\u043b\u043e\u0432\u0438\u043b\u0438. \u041b\u0430\u0434\u043d\u043e, \u043d\u0435 \u0431\u0435\u0434\u0430, \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b, \u0441\u043d\u043e\u0432\u0430 \u0441\u0431\u043e\u0440\u043a\u0430. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 <strong>make_boot.bat<\/strong> \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u043e \u0432 <strong>make_all.bat<\/strong> \u0432\u044b\u043b\u0435\u0437\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u043e \u043d\u0435\u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445 \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438. \u0427\u0451\u0440\u0442, \u044f \u043d\u0430\u0434\u0435\u044f\u043b\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435.<\/p>\n<p>\u0414\u043e \u043c\u0435\u043d\u044f \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u0434\u043e\u0448\u043b\u043e, \u0432 \u0447\u0451\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u042f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e .cpp-\u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 gen. \u0422\u0430\u043a \u0432\u043e\u0442, \u043f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f <strong>VIO_DEBUG<\/strong> \u0447\u0430\u0441\u0442\u044c \u044d\u0442\u0438\u0445 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043f\u0443\u0441\u0442\u044b\u043c\u0438. \u042d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435 <strong>make_boot.bat<\/strong>. \u042f \u043f\u043e\u043b\u0435\u0437 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c: \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <strong>gpre<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0430\u043c\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0447\u0443\u0442\u044c \u0440\u0430\u043d\u044c\u0448\u0435. \u041f\u0440\u0438 \u043a\u043e\u043f\u0430\u043d\u0438\u0438 \u0432 cmd-\u0444\u0430\u0439\u043b\u0430\u0445 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c echo \u0438 \u0443\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e @ \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438, \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u041f\u043e\u043d\u044f\u0432, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f <strong>gpre<\/strong>, \u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e, \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0451\u043b \u043f\u0443\u0441\u0442\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041d\u0443 \u0447\u0442\u043e \u0436\u0435, \u043c\u0430\u043b\u043e \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u043e\u0442\u043b\u0430\u0434\u043a\u0438 firebird, \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c gpre. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u0434\u0430\u0436\u0435 pdb-\u0444\u0430\u0439\u043b \u0441\u043e\u0437\u0434\u0430\u043b\u0441\u044f. \u041a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0435, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0427\u0435\u043c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u0435\u043d \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a, \u0442\u0430\u043a \u044d\u0442\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d \u043b\u043e\u0432\u0438\u0442 \u0432\u0441\u044f\u043a\u0438\u0435 \u0436\u0451\u0441\u0442\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0430\u043c. \u042f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u043b\u0441\u044f \u0432 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u043c\u043d\u0435 \u043d\u0430\u0441\u043a\u0443\u0447\u0438\u043b\u043e, \u044f \u0442\u0443\u043f\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0438 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u043b ACCESS VIOLATION. \u0425\u043e-\u0445\u043e, \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 .cpp-\u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f VIO, \u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>VIO_record()<\/strong> \u043f\u0440\u044f\u043c\u043e \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c <strong>VIO_trace()<\/strong> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e null-\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e. \u042f \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b \u043a\u043e\u0434 <strong>VIO_record()<\/strong>, \u0438 \u0442\u0430\u043c \u044f \u0434\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438 \u0443\u0431\u0440\u0430\u043b \u0432\u044b\u0437\u043e\u0432\u044b <strong>VIO_trace()<\/strong>, \u043f\u043e <a href=\"https:\/\/github.com\/FirebirdSQL\/firebird\/blob\/v5.0.2\/src\/jrd\/vio.cpp#L3847\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a> \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0442 \u0442\u0443\u0442:<\/p>\n<pre><code class=\"cpp\">Record* VIO_record(thread_db* tdbb, record_param* rpb, const Format* format, MemoryPool* pool) { SET_TDBB(tdbb);  #ifdef VIO_DEBUG jrd_rel* relation = rpb-&gt;rpb_relation; VIO_trace(DEBUG_TRACE, \"VIO_record (rel_id %u, record_param %\" QUADFORMAT\"d, format %d, pool %p)\\n\", relation-&gt;rel_id, rpb-&gt;rpb_number.getVa<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-469833","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/469833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=469833"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/469833\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=469833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=469833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=469833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}