-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
DEFAULT values are unnecessary evaluated [CORE1842] #2271
Comments
Modified by: @dyemanovassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @asfernandes First of all, Firebird doesn't support zero dates, so I'll rename the ticket description. Second, I don't see this as a bug. Defaults are first evaluated and then assignments are made. Fields that doesn't are assigned become with the default value. So I'll change to improvement. |
Modified by: @asfernandesissuetype: Bug [ 1 ] => Improvement [ 4 ] Version: 2.5 Initial [ 10260 ] summary: zero default value for field date types => DEFAULT values are unnecessary evaluated |
Commented by: @dyemanov Adriano, I disagree. While we of course don't support zero dates, the error is thrown for a perfectly valid SQL statement. And IMHO this is a bug, regardless of our internal algorithms. |
Commented by: @asfernandes We support a very limited set of expressions in DEFAULT, so any (possible) incorrect DEFAULT are going to cause problem in an INSERT that needs to evaluate defaults. I see this as an implementation detail (if the standard doesn't specify WHEN they should be evaluated) that *currently* doesn't affect real-life usage. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 Beta 1 [ 10251 ] |
Modified by: @pmakowskistatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovQA Status: No test => Done successfully |
Submitted by: Alex Karp (karp)
Is related to QA313
create the table:
create table tb_date (
tb_date_id integer not null primary key,
f_date date default 0);
after this inse we attempt insert new record:
INSERT INTO TB_DATE (
TB_DATE_ID, F_DATE)
VALUES (
1, '09-MAY-1945');
or
insert into tb_date (
tb_date_id, f_date)
values (
2, null);
and obtain the error:
The next statement causes the following error:
Overflow occurred during data type conversion.
conversion error from string "0".
although the inserted value f_date is correct - engine is checked the correctness default value of field f_date
Alex Karpeykin
Commits: 97693bc
The text was updated successfully, but these errors were encountered: