8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 19:23:03 +01:00

Improvement CORE-2587 : User friendly diagnostic when engine can't create shared memory already created by the antoher engine process in another windows session

This commit is contained in:
hvlad 2009-08-08 12:41:45 +00:00
parent 5daf2de165
commit 2ac6ae2804
4 changed files with 10 additions and 2 deletions

View File

@ -2402,8 +2402,14 @@ UCHAR* ISC_map_file(ISC_STATUS* status_vector,
NULL);
if (file_handle == INVALID_HANDLE_VALUE)
{
const DWORD err = GetLastError();
if ((err == ERROR_USER_MAPPED_FILE) && init_flag && file_exists && trunc_flag)
Arg::Gds(isc_instance_conflict).copyTo(status_vector);
else
error(status_vector, "CreateFile", err);
CloseHandle(event_handle);
error(status_vector, "CreateFile", GetLastError());
return NULL;
}

View File

@ -1,7 +1,7 @@
/* MAX_NUMBER is the next number to be used, always one more than the highest message number. */
set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES (?, ?, ?, ?);
--
('2009-08-06 09:05:54', 'JRD', 0, 664)
('2009-08-08 15:21:00', 'JRD', 0, 665)
-- Reserved 513-529 by CVC
('2009-07-16 05:41:59', 'QLI', 1, 530)
('2008-11-28 20:27:04', 'GDEF', 2, 346)

View File

@ -771,6 +771,7 @@ Data source : @4', NULL, NULL)
('sysf_fp_overflow', 'evlStdMath', 'SysFunction.cpp', NULL, 0, 661, NULL, 'Floating point overflow in built-in function @1', NULL, NULL);
('udf_fp_overflow', 'FUN_evaluate', 'fun.epp', NULL, 0, 662, NULL, 'Floating point overflow in result from UDF @1', NULL, NULL);
('udf_fp_nan', 'FUN_evaluate', 'fun.epp', NULL, 0, 663, NULL, 'Invalid floating point value returned by UDF @1', NULL, NULL);
('instance_conflict', 'ISC_map_file', 'isc_sync.cpp', NULL, 0, 664, NULL, 'Database is probably already opened by another engine instance in another Windows session', NULL, NULL);
-- QLI
(NULL, NULL, NULL, NULL, 1, 0, NULL, 'expected type', NULL, NULL);
(NULL, NULL, NULL, NULL, 1, 1, NULL, 'bad block type', NULL, NULL);

View File

@ -669,6 +669,7 @@ set bulk_insert INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, FA
(-833, '42', '000', 0, 661, 'sysf_fp_overflow', NULL, NULL)
(-901, '39', '000', 0, 662, 'udf_fp_overflow', NULL, NULL)
(-901, '39', '000', 0, 663, 'udf_fp_nan', NULL, NULL)
(-902, '42', '000', 0, 664, 'instance_conflict', NULL, NULL)
-- GFIX
(-901, '00', '000', 3, 1, 'gfix_db_name', NULL, NULL)
(-901, '00', '000', 3, 2, 'gfix_invalid_sw', NULL, NULL)