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

Recreate DataTypeUtilBase::makeFromList [CORE2435] #2851

Closed
firebird-automations opened this issue Apr 16, 2009 · 8 comments
Closed

Recreate DataTypeUtilBase::makeFromList [CORE2435] #2851

firebird-automations opened this issue Apr 16, 2009 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @asfernandes

Jira_subtask_inward CORE2361

Attachments:
core2361.sh
core2361.sql
core2361.txt

What is now DataTypeUtilBase::makeFromList is a bugged monster function. No way to maintain it, as for CORE2361.

Its comments got misleading and it does not work consistent re. blob sub types and charset/collatios.

A much more clean and small routine is in the way.

Commits: 502f0f9

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Claudio Valderrama C. (robocop)

When you say makeList, do you mean DataTypeUtilBase::makeFromList ???

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Yes, Claudio. Thanks.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

description: What is now DataTypeUtil::makeList is a bugged monster function. No way to maintain it, as for CORE2361.

Its comments got misleading and it does not work consistent re. blob sub types and charset/collatios.

A much more clean and small routine is in the way.

=>

What is now DataTypeUtilBase::makeFromList is a bugged monster function. No way to maintain it, as for CORE2361.

Its comments got misleading and it does not work consistent re. blob sub types and charset/collatios.

A much more clean and small routine is in the way.

summary: Recreate DataTypeUtil::makeList => Recreate DataTypeUtilBase::makeFromList

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Test script and result differences against old function.

The output type is figured out as based on this order:
1) If any datatype is blob, returns blob;
2) If any datatype is a) varying or b) any text and another datatype, returns varying;
3) If any datatype is text or cstring, returns text;
4) If any datatype is approximate numeric then each datatype in the list shall be numeric (
otherwise an error is thrown), returns approximate numeric;
5) If any datatype is a date/time/timestamp then each datatype in the list shall be the same
date/time/timestamp (otherwise an error is thrown), returns a date/time/timestamp.

If a blob is returned, and there is a binary blob in the list, a binary blob is returned.

If a blob/text is returned, the returned charset is figured out as based on this order:
1) If there is a OCTETS blob/string, returns OCTETS;
2) If there is a non-(NONE/ASCII) blob/string, returns it charset;
3) If there is a ASCII blob/string, a numeric or a date/time/timestamp, returns ASCII;
4) Otherwise, returns NONE.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Attachment: http://core2361.sh [ 11441 ]

Attachment: core2361.sql [ 11442 ]

Attachment: core2361.txt [ 11443 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC1 [ 10300 ]

@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