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

Added not null timestamp col with default causes error on select of old null records [CORE3453] #3814

Closed
firebird-automations opened this issue Apr 28, 2011 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @krilbe

Is related to QA479

FB 2.1 using isql, connect with utf8 to a database with default charset
utf8. Then try this (commits excluded for brevity):

create table "Temp" ("Dummy" int);
insert into "Temp" ("Dummy") values (1);
select * from "Temp";
alter table "Temp" add "New" timestamp default '0001-01-01' not null;
select * from "Temp";

This will result in an error (actual transcript):
----------------------------------------------------------
SQL> select * from "Temp";

Dummy New
============ =========================
Statement failed, SQLCODE = -413
conversion error from string "00"
----------------------------------------------------------

If I try it without specifying a connection charset there's no error and
the expected default is returned upon select.

I tried also with e.g. '1901-01-01' and then it complains about "19"
instead, so it appears to be (at least) the century that causes problems.

A workaround:
update "Temp" set "New" = '0001-01-01';
After that it seems to work.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

I'm marking this as resolved in 2.5 caused there were very many related changes and problems with multi-byte literals.

A backport seems unlikely to happen.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.0 [ 10221 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA479 [ QA479 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Test created.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

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

No branches or pull requests

2 participants