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
Incorrect default value when adding a new column [CORE4351] #4673
Comments
Modified by: Yiannis Bourkelis (yiannis)Attachment: Database.fdb [ 12441 ] |
Commented by: @hvlad a) what is connection character set ? |
Commented by: Ann Harrison (awharrison) Should a newly defined default apply to records that were stored with a null in that field? |
Commented by: Yiannis Bourkelis (yiannis) @vlad: On flamerobin the connection charset is set to NONE. I also tryied UTF8. Both return incorrect results. I just tryied to run the query using isql and it works correctly. @ann: I have never tryied that. Whenever I want to change the value of existing NULL columns, I execute an UPDATE statement first and then set the DEFAULT on that field to be sure. |
Commented by: @asfernandes > I just tryied to run the query using isql and it works correctly. So? It's a problem with Flamerobin? |
Commented by: Sean Leyne (seanleyne) Case is closed, since the issue cannot be reproduced with Firebird tools/components. |
Modified by: Sean Leyne (seanleyne)status: Open [ 1 ] => Resolved [ 5 ] resolution: Cannot Reproduce [ 5 ] |
Commented by: Yiannis Bourkelis (yiannis) I will try to reproduce it with isql. How can I set the connection character set to NONE or UTF8? |
Commented by: @asfernandes isql -ch utf8 |
Commented by: Yiannis Bourkelis (yiannis) Thank you Adriano, Steps to reproduce: 1.run isql.exe -ch utf8 <path to attached database> -user SYSDBA -password <your password> 2. SQL> ALTER TABLE PRACTICEINFO ADD GOOGLE_PASSWORD VARCHAR(400) CHARACTER SET UTF8 DEFAULT 'MdX8fLruCUQ=' NOT NULL COLLATE UTF8; 3. exit; Inspect the value of PRACTICEIFNO.GOOGLE_PASSWORD field. It is 'MdX' and not 'MdX8fLruCUQ=' |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @asfernandes Can you also test 2.5? I believe it's fixed there. |
Commented by: Sean Leyne (seanleyne) It seems that it is a real issue, but with older builds. So, re-opening pending review. |
Modified by: Sean Leyne (seanleyne)status: Closed [ 6 ] => Reopened [ 4 ] resolution: Cannot Reproduce [ 5 ] => |
Commented by: Yiannis Bourkelis (yiannis) I tested it on Firebird 2.5.2.26539 and it works as expected. |
Modified by: Sean Leyne (seanleyne)status: Reopened [ 4 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5.2 [ 10450 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Done successfully Test Details: Confirmed on WI-V2.1.7.18553: pwd = 'MdX' |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Yiannis Bourkelis (yiannis)
Attachments:
Database.fdb
On the existing table PRACTICEIFO which contains one record, I want to add a new field with name: GOOGLE_PASSWORD and default value: 'MdX8fLruCUQ=' using the following query, however when executing the query the default value of the new field is incorrect.
Steps to reproduce:
Execute the following sql statement on the attached database:
ALTER TABLE PRACTICEINFO ADD GOOGLE_PASSWORD VARCHAR(400) CHARACTER SET UTF8 DEFAULT 'MdX8fLruCUQ=' NOT NULL COLLATE UTF8;
Expected results:
The value of GOOGLE_PASSWORD column on existing record shoud be 'MdX8fLruCUQ='
Actual results:
The value of GOOGLE_PASSWORD column on existing records is 'MdX'
====== Test Details ======
Confirmed on WI-V2.1.7.18553: pwd = 'MdX'
The text was updated successfully, but these errors were encountered: