-
-
Notifications
You must be signed in to change notification settings - Fork 233
Problem altering numeric field type [CORE1162] #1585
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
Comments
Modified by: @pcisarreporter: Carlos H. Cantu [ warmbooter ] => prenosil [ prenosil ] |
Modified by: @pcisardescription: This bug was found by Ivan Prenosil. I'm just posting it here because he is busy to post it now, and authorized me to post in his name: create table tab ( a numeric(4,2) ); insert into tab values (99.99); select * from tab;
======= alter table tab alter a type numeric(4,3); select * from tab; Statement failed, SQLCODE = -802 Btw. the database is not "corrupted" too badly - you can revert the change back by alter table tab alter a type numeric(4,2); => create table tab ( a numeric(4,2) ); insert into tab values (99.99); select * from tab;
======= alter table tab alter a type numeric(4,3); select * from tab; Statement failed, SQLCODE = -802 Btw. the database is not "corrupted" too badly - you can revert the change back by alter table tab alter a type numeric(4,2); |
Modified by: Claudio Valderrama C. (robocop)assignee: Claudio Valderrama C. [ robocop ] |
Commented by: Claudio Valderrama C. (robocop) Again, dyn_mod.epp. This time, check_update_fld_type(). |
Modified by: @dyemanovFix Version: 2.1 [ 10041 ] description: insert into tab values (99.99); select * from tab;
======= alter table tab alter a type numeric(4,3); select * from tab; Statement failed, SQLCODE = -802 Btw. the database is not "corrupted" too badly - you can revert the change back by alter table tab alter a type numeric(4,2); => create table tab ( a numeric(4,2) ); insert into tab values (99.99); select * from tab;
======= alter table tab alter a type numeric(4,3); select * from tab; Statement failed, SQLCODE = -802 Btw. the database is not "corrupted" too badly - you can revert the change back by alter table tab alter a type numeric(4,2); |
Commented by: @pmakowski Q/A test in 2.0.1 ok |
Modified by: @pmakowskistatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @pmakowski Here what I get under FB-SS-Win32-2.0.1.12855 : And here what I get under FB-SS-Win32-2.1.0.15999 :
details : SQL> create table tab ( a numeric(4,2) );
======= SQL> commit; |
Commented by: @pmakowski Closed and test ok and made for 2.1 |
Modified by: @pcisarWorkflow: jira [ 11680 ] => Firebird [ 15209 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovQA Status: No test => Done successfully |
Submitted by: prenosil (prenosil)
Assigned to: Claudio Valderrama C. (robocop)
Is related to QA152
Votes: 1
create table tab ( a numeric(4,2) );
insert into tab values (99.99);
select * from tab;
=======
99.99
alter table tab alter a type numeric(4,3);
select * from tab;
Statement failed, SQLCODE = -802
arithmetic exception, numeric overflow, or string truncation
Btw. the database is not "corrupted" too badly - you can revert the change back by alter table tab alter a type numeric(4,2);
and the engine is clever enough to convert data from stored format to requested one directly, not through all intermediate format versions.
Commits: 01864d3
The text was updated successfully, but these errors were encountered: