Added not null timestamp col with default causes error on select of old null
records
------------------------------------------------------------------------------------
Key: CORE-3453
URL: http://tracker.firebirdsql.org/browse/CORE-3453
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 2.1.4
Environment: Windows
Reporter: Kjell Rilbe
Priority: Minor
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel