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

Direct system table modifications are not completely prohibited [CORE5567] #5834

Closed
firebird-issue-importer opened this issue Jun 12, 2017 · 5 comments

Comments

@firebird-issue-importer

Submitted by: John Kilin (johnkilin)

SQL> create database '/work/data/systab.fdb';
SQL> create domain my_type numeric(18, 2);
SQL> commit;

SQL> show domain MY_TYPE;
MY_TYPE NUMERIC(18, 2) Nullable

SQL> update rdb$fields set rdb$field_scale = -3 where rdb$field_name = 'MY_TYPE';
Statement failed, SQLSTATE = 42000
UPDATE operation is not allowed for system table RDB$FIELDS
-- THIS IS EXPECTED
SQL> rollback;

SQL> show domain MY_TYPE;
MY_TYPE NUMERIC(18, 2) Nullable

SQL> set term ^;
SQL> execute block as
CON> begin
CON> update rdb$fields set rdb$field_scale = -3 where rdb$field_name = 'MY_TYPE';
CON> end^
Statement failed, SQLSTATE = 42000
UPDATE operation is not allowed for system table RDB$FIELDS
-At block line: 3, col: 1
-- ALSO EXPECTED
SQL> set term ;^
SQL> rollback;

SQL> show domain MY_TYPE;
MY_TYPE NUMERIC(18, 2) Nullable

SQL> set term ^;
SQL> execute block as
CON> declare procedure hack as
CON> begin
CON> update rdb$fields set rdb$field_scale = -3 where rdb$field_name = 'MY_TYPE';
CON> end
CON> begin
CON> execute procedure hack;
CON> end^
SQL> set term ;^
SQL> commit;

SQL> show domain MY_TYPE;
MY_TYPE NUMERIC(18, 3) Nullable

-- WTF???

Commits: 9364fac 019503f

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 12, 2017

Modified by: @dyemanov

reporter: Dmitry Yemanov [ dimitr ] => John Kilin [ johnkilin ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 13, 2017

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 13, 2017

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

Fix Version: 3.0.3 [ 10810 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 22, 2017

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 22, 2017

Modified by: @pavel-zotov

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

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