mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Misc.
This commit is contained in:
parent
05c40f0ae5
commit
9fbee6b719
@ -483,6 +483,6 @@ ISQL now also takes into an account global role setting when creating databases.
|
|||||||
In some cases it's desired to keep shadow file after dropping shadow (for example for
|
In some cases it's desired to keep shadow file after dropping shadow (for example for
|
||||||
backup purporse). In FB3 appropriate clause is added to DROP SHADOW. Full syntax is:
|
backup purporse). In FB3 appropriate clause is added to DROP SHADOW. Full syntax is:
|
||||||
|
|
||||||
DROP SHADOW number [{PRESERVE | DELETE} FILE];
|
DROP SHADOW <number> [{PRESERVE | DELETE} FILE];
|
||||||
|
|
||||||
Default behavior is to delete file keeping backwards compatibility.
|
Default behavior is to delete file, keeping backwards compatibility.
|
||||||
|
@ -286,7 +286,7 @@ public:
|
|||||||
if (flagOsUnload)
|
if (flagOsUnload)
|
||||||
{
|
{
|
||||||
const bool dontCleanup = MasterInterfacePtr()->getProcessExiting();
|
const bool dontCleanup = MasterInterfacePtr()->getProcessExiting();
|
||||||
if (dontCleanup)
|
if (dontCleanup)
|
||||||
{
|
{
|
||||||
InstanceControl::cancelCleanup();
|
InstanceControl::cancelCleanup();
|
||||||
return;
|
return;
|
||||||
|
@ -34,7 +34,7 @@ See http://developers.sun.com/solaris/articles/atomic_sparc/
|
|||||||
add %g1,%o1,%o2 ! compute the desired result, %g1 + %o1 (value) -> %o2 (temporary)
|
add %g1,%o1,%o2 ! compute the desired result, %g1 + %o1 (value) -> %o2 (temporary)
|
||||||
0:
|
0:
|
||||||
cas [%o0],%g1,%o2 ! try to CAS it into place
|
cas [%o0],%g1,%o2 ! try to CAS it into place
|
||||||
cmp %g1,%o2 ! compare old to FB_NEW
|
cmp %g1,%o2 ! compare old to new
|
||||||
bne,a,pn %icc,0b ! CAS failed, try again
|
bne,a,pn %icc,0b ! CAS failed, try again
|
||||||
mov %o2,%g1 ! copy result -> %g1 for next iteration
|
mov %o2,%g1 ! copy result -> %g1 for next iteration
|
||||||
mov %o2,%o0 ! return old value
|
mov %o2,%o0 ! return old value
|
||||||
@ -42,7 +42,7 @@ See http://developers.sun.com/solaris/articles/atomic_sparc/
|
|||||||
.end
|
.end
|
||||||
|
|
||||||
/* sparc version of compare_and_swap, see fb_atomic.h */
|
/* sparc version of compare_and_swap, see fb_atomic.h */
|
||||||
/* extern boolean_t compare_and_swap_il(volatile unsigned *word_addr, unsigned *old_val_addr, int FB_NEW_val); */
|
/* extern boolean_t compare_and_swap_il(volatile unsigned *word_addr, unsigned *old_val_addr, int new_val); */
|
||||||
|
|
||||||
.inline compare_and_swap_il,12
|
.inline compare_and_swap_il,12
|
||||||
membar #LoadStore|#StoreStore
|
membar #LoadStore|#StoreStore
|
||||||
|
@ -126,7 +126,8 @@ void testBitmap()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf(" DONE\n");
|
printf(" DONE\n");
|
||||||
/*
|
|
||||||
|
/***
|
||||||
printf("Verify AND operation for correctness (and forward iterator)");
|
printf("Verify AND operation for correctness (and forward iterator)");
|
||||||
for (i = 0; i < BITMAP_ITEMS; i++) {
|
for (i = 0; i < BITMAP_ITEMS; i++) {
|
||||||
tree.add(v1[i]);
|
tree.add(v1[i]);
|
||||||
@ -187,7 +188,7 @@ void testBitmap()
|
|||||||
fb_assert((ULONG)tree.current() == or_res->current());
|
fb_assert((ULONG)tree.current() == or_res->current());
|
||||||
}
|
}
|
||||||
printf(" DONE\n");
|
printf(" DONE\n");
|
||||||
*/
|
***/
|
||||||
}
|
}
|
||||||
|
|
||||||
const FB_SIZE_T TEST_ITEMS = 10000;
|
const FB_SIZE_T TEST_ITEMS = 10000;
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
main(int ac, char **av)
|
|
||||||
|
main(int ac, char** av)
|
||||||
{
|
{
|
||||||
int mode = ac < 2 ? 0 : ((*av[1]) - '0');
|
int mode = ac < 2 ? 0 : ((*av[1]) - '0');
|
||||||
|
|
||||||
@ -40,6 +41,7 @@ main(int ac, char **av)
|
|||||||
{
|
{
|
||||||
if (mode == 0)
|
if (mode == 0)
|
||||||
printf ("\t%d, // %d\n", slot, cur);
|
printf ("\t%d, // %d\n", slot, cur);
|
||||||
|
|
||||||
if (((cur - prev) * 10) / cur > 0)
|
if (((cur - prev) * 10) / cur > 0)
|
||||||
{
|
{
|
||||||
if (mode == 1)
|
if (mode == 1)
|
||||||
@ -47,6 +49,7 @@ main(int ac, char **av)
|
|||||||
prev = cur;
|
prev = cur;
|
||||||
++slot;
|
++slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur += dstep;
|
cur += dstep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
main(int ac, char **av)
|
|
||||||
|
main(int ac, char** av)
|
||||||
{
|
{
|
||||||
int mode = ac < 2 ? 0 : ((*av[1]) - '0');
|
int mode = ac < 2 ? 0 : ((*av[1]) - '0');
|
||||||
|
|
||||||
@ -40,13 +41,16 @@ main(int ac, char **av)
|
|||||||
{
|
{
|
||||||
if (mode == 0)
|
if (mode == 0)
|
||||||
printf ("\t%d, // %d\n", slot, cur);
|
printf ("\t%d, // %d\n", slot, cur);
|
||||||
|
|
||||||
if (((cur - prev) * 10) / cur > 0)
|
if (((cur - prev) * 10) / cur > 0)
|
||||||
{
|
{
|
||||||
if (mode == 1)
|
if (mode == 1)
|
||||||
printf ("\t%d, // %d\n", cur, slot);
|
printf ("\t%d, // %d\n", cur, slot);
|
||||||
|
|
||||||
prev = cur;
|
prev = cur;
|
||||||
++slot;
|
++slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur += dstep;
|
cur += dstep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3122,9 +3122,9 @@ DmlNode* ExecStatementNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScr
|
|||||||
MemoryPool& pool = csb->csb_pool;
|
MemoryPool& pool = csb->csb_pool;
|
||||||
|
|
||||||
if (!node->inputNames)
|
if (!node->inputNames)
|
||||||
node->inputNames = FB_NEW_POOL (pool) EDS::ParamNames(pool);
|
node->inputNames = FB_NEW_POOL(pool) EDS::ParamNames(pool);
|
||||||
|
|
||||||
MetaName* newName = FB_NEW_POOL (pool) MetaName(pool, name);
|
MetaName* newName = FB_NEW_POOL(pool) MetaName(pool, name);
|
||||||
node->inputNames->add(newName);
|
node->inputNames->add(newName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,17 +163,17 @@ jrd_req* CMP_compile2(thread_db* tdbb, const UCHAR* blr, ULONG blr_length, bool
|
|||||||
|
|
||||||
// 26.09.2002 Nickolay Samofatov: default memory pool will become statement pool
|
// 26.09.2002 Nickolay Samofatov: default memory pool will become statement pool
|
||||||
// and will be freed by CMP_release
|
// and will be freed by CMP_release
|
||||||
MemoryPool* const FB_NEW_pool = att->createPool();
|
MemoryPool* const new_pool = att->createPool();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Jrd::ContextPoolHolder context(tdbb, FB_NEW_pool);
|
Jrd::ContextPoolHolder context(tdbb, new_pool);
|
||||||
|
|
||||||
CompilerScratch* csb =
|
CompilerScratch* csb =
|
||||||
PAR_parse(tdbb, blr, blr_length, internal_flag, dbginfo_length, dbginfo);
|
PAR_parse(tdbb, blr, blr_length, internal_flag, dbginfo_length, dbginfo);
|
||||||
|
|
||||||
request = JrdStatement::makeRequest(tdbb, csb, internal_flag);
|
request = JrdStatement::makeRequest(tdbb, csb, internal_flag);
|
||||||
FB_NEW_pool->setStatsGroup(request->req_memory_stats);
|
new_pool->setStatsGroup(request->req_memory_stats);
|
||||||
|
|
||||||
#ifdef CMP_DEBUG
|
#ifdef CMP_DEBUG
|
||||||
if (csb->csb_dump.hasData())
|
if (csb->csb_dump.hasData())
|
||||||
@ -205,7 +205,7 @@ jrd_req* CMP_compile2(thread_db* tdbb, const UCHAR* blr, ULONG blr_length, bool
|
|||||||
if (request)
|
if (request)
|
||||||
CMP_release(tdbb, request);
|
CMP_release(tdbb, request);
|
||||||
else
|
else
|
||||||
att->deletePool(FB_NEW_pool);
|
att->deletePool(new_pool);
|
||||||
ERR_punt();
|
ERR_punt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,7 +369,7 @@ void CMP_post_access(thread_db* tdbb,
|
|||||||
*
|
*
|
||||||
* Functional description
|
* Functional description
|
||||||
* Post access to security class to request.
|
* Post access to security class to request.
|
||||||
* We append the FB_NEW security class to the existing list of
|
* We append the new security class to the existing list of
|
||||||
* security classes for that request.
|
* security classes for that request.
|
||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
|
@ -121,7 +121,7 @@ namespace {
|
|||||||
#endif
|
#endif
|
||||||
static const char* const FOPEN_READ_ONLY = "rb";
|
static const char* const FOPEN_READ_ONLY = "rb";
|
||||||
|
|
||||||
FILE *ext_fopen(Database* dbb, ExternalFile* ext_file)
|
FILE* ext_fopen(Database* dbb, ExternalFile* ext_file)
|
||||||
{
|
{
|
||||||
const char* file_name = ext_file->ext_filename;
|
const char* file_name = ext_file->ext_filename;
|
||||||
|
|
||||||
|
@ -1738,7 +1738,8 @@ void VIO_erase(thread_db* tdbb, record_param* rpb, jrd_tra* transaction)
|
|||||||
else if (EVL_field(0, rpb->rpb_record, f_file_shad_num, &desc2) &&
|
else if (EVL_field(0, rpb->rpb_record, f_file_shad_num, &desc2) &&
|
||||||
(id = MOV_get_long(&desc2, 0)))
|
(id = MOV_get_long(&desc2, 0)))
|
||||||
{
|
{
|
||||||
if (!(file_flags & FILE_inactive)) {
|
if (!(file_flags & FILE_inactive))
|
||||||
|
{
|
||||||
if (file_flags & FILE_nodelete)
|
if (file_flags & FILE_nodelete)
|
||||||
DFW_post_work(transaction, dfw_delete_shadow_nodelete, &desc, id);
|
DFW_post_work(transaction, dfw_delete_shadow_nodelete, &desc, id);
|
||||||
else
|
else
|
||||||
|
@ -84,7 +84,7 @@ CFBDialog::CFBDialog(CWnd* pParent /*=NULL*/)
|
|||||||
fb_status.SufficientUserRights = true;
|
fb_status.SufficientUserRights = true;
|
||||||
fb_status.ServerName = "";
|
fb_status.ServerName = "";
|
||||||
|
|
||||||
FB_NEW_settings = fb_status;
|
new_settings = fb_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user