Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem creating table leave the database in inconsistent state [CORE1914] #2347

Closed
firebird-automations opened this issue May 26, 2008 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @asfernandes

This bug was reported privatelly by Claudio some time ago... It's more problematic in 2.5, but not everything is good in previous version.

Steps to reproduce:
1) rename fbintl.conf to fbintl.ttt
2) start the server
3) isql
create database 't.fdb';
create table t (c varchar(10) character set win1252);
Statement failed, SQLCODE = -607
unsuccessful metadata update
-T
-CHARACTER SET WIN1252 is not installed
exit;
4) stop the server
5) rename fbintl.ttt to fbintl.conf
6) start the server
7) isql t.fdb
create table t (c varchar(10) character set win1252);
insert into t values ('a');
Dynamic SQL Error
-SQL error code = -804
-Count of read-write columns does not equal count of values

drop table t;
create table t (c varchar(10) character set win1252);
insert into t values ('a');
-- ok

What's happen:

When the table fails to be created, records in RDB$PAGES was already inserted in system transaction and is not deleted in the cleanup. In V < 2.5, the problem is not visible as RDB$DATABASE.RDB$RELATION_ID is also incremented in system transaction and is not reused.

In 2.5, when looking for a relation id that has already RDB$PAGES entries, it causes no record inserted in RDB$FORMATS.

Commits: 956b6df

====== Test Details ======

Can not rename any of FB files and restart server using fbtest framework.
Tried on WI-V2.1.0.17798 without step when 'fbintl.dll' is renamed - no effect.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Added call, deleting table's pages in case of error at last stage of CREATE TABLE.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Cannot be tested

Test Details: Can not rename any of FB files and restart server using fbtest framework.
Tried on WI-V2.1.0.17798 without step when 'fbintl.dll' is renamed - no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment