Issue Details (XML | Word | Printable)

Key: CORE-3138
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Kuznetsov Eugene
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Internal error or crash occurs when accessing any MON$ table after altering its structure

Created: 17/Sep/10 07:23 PM   Updated: 23/Feb/11 07:40 AM
Component/s: Engine
Affects Version/s: 2.1.0, 2.1.1, 2.1.2, 2.1.3, 3.0 Initial, 2.5 RC3, 2.5.0
Fix Version/s: 2.5.1, 2.1.5, 3.0 Alpha 1

Time Tracking:
Not Specified

Environment: Windows XP, Firebird-2.5.0.26084-0_Win32 shapshot

Planning Status: Unspecified


 Description  « Hide
Steps to reproduce
1.Create test base and ordinary user in isql
CREATE DATABASE "localhost:lab" USER "SYSDBA" PASSWORD "masterkey" PAGE_SIZE 8192 DEFAULT CHARACTER SET WIN1251;
CREATE USER TEST2 PASSWORD 'TEST2';
EXIT;
2. Succesfully change MON$ATTACHMENTS structure under TEST2
CONNECT "localhost:lab" USER "TEST2" PASSWORD "TEST2";
ALTER TABLE MON$ATTACHMENTS DROP MON$SERVER_PID;
EXIT;

Then SELECT * FROM MON$ATTACHMENTS from any connection returns
Statement failed, SQLSTATE = XX000
internal error
--
BR, Eugene

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Kuznetsov Eugene added a comment - 17/Sep/10 08:00 PM
Firebird-2.1.4.18347-0_Win32 snapshot is also undergone.

Such scenario crashes 2.1.4 (but not 2.5)

CONNECT "localhost:lab" USER "TEST2" PASSWORD "TEST2";
SELECT * FROM MON$ATTACHMENTS;
ALTER TABLE MON$ATTACHMENTS DROP MON$SERVER_PID;
SELECT * FROM MON$ATTACHMENTS;
SELECT MON$USER FROM MON$ATTACHMENTS;
ALTER TABLE MON$ATTACHMENTS DROP MON$USER;
SELECT * FROM MON$ATTACHMENTS;

Statement failed, SQLCODE = -902
Unable to complete network request to host "localhost".
...

Dmitry Yemanov added a comment - 14/Feb/11 08:27 AM
I cannot reproduce the crash on v2.1.4. For me, it throws the same "internal error" as v2.5.0.

Dmitry Yemanov added a comment - 14/Feb/11 08:31 AM
Sorry, now I see the crash.

Dmitry Yemanov added a comment - 14/Feb/11 10:36 AM
I have changed the ticket title to reflect only the subsequences (error/crash) of the altering the MON$ tables. Accessing them should behave similarly to regular tables, i.e. survive the structure changes properly. As for being allowed to alter system tables in general (not only MON$ tables are affected), please create a separate ticket.