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

Conversion of SQL_TEXT / SQL_VARCHAR to SQL_TIMESTAMP / SQL_TYPE_TIME / SQL_TYPE_DATE [CORE2066] #2502

Closed
firebird-issue-importer opened this issue Sep 5, 2008 · 10 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Sep 5, 2008

Submitted by: @ibprovider

Attachments:
fb_link_tests.rar

Hi

I made some tests for isc_dsql_fetch and obtained the next problems

1. Column: COL_VARCHAR_32 VARCHAR(32) with string "2008-02-23 3:4:5.6789"
2. SQL: "select COL_VARCHAR_32 from <table>
3. Client Dialect == 3 [used at prepare stage]
4. Define XSQLVAR for get this value as SQL_TIMESTAMP datatype. Server should do a transformation of VARCHAR to TIMESTAMP

Get error:
Dynamic SQL Error
SQL error code = -303
arithmetic exception, numeric overflow, or string truncation

But, I can get a SQL_TIMESTAMP columns as SQL_VARYING

---
SQL: "select CAST(COL_VARCHAR_32 as TIMESTAMP) from <table>" works very good :-)

Commits: 51a3f06

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 8, 2008

Commented by: @asfernandes

Can you prepare a test-case?

Thanks.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 8, 2008

Modified by: @ibprovider

Attachment: fb_link_tests.rar [ 11040 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 8, 2008

Commented by: @ibprovider

No problem. See attach file

Binary maded in VS2005 SP1 (release 32-bit).

GDB - FB 2.1.1

Correct at BAT-file the path to fbclient.dll and path to test database

Execute from command line:

release_test_fbclient.BAT isc_stmt.011.select.VARCHAR.TIMESTAMP
release_test_fbclient.BAT isc_stmt.011.select.VARCHAR.TYPE_TIME
release_test_fbclient.BAT isc_stmt.011.select.VARCHAR.TYPE_DATE

or
release_test_fbclient.BAT isc_stmt.011.select.VARCHAR.*

Regards
Dmitry Kovalenko
http://www.ibprovider.com

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 8, 2008

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 8, 2008

Commented by: @asfernandes

Can you confirm a thing?

Does the error occur when fetch are going to return no more data?

If not, can you test with embedded and verify same thing?

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 8, 2008

Commented by: @ibprovider

Sorry, I don't understand your question

>Does the error occur when fetch are going to return no more data?

Abstract:
- First fetch of EOF should return 100L
- Second fetch of EOF _can_ (must?) return "sync error"

----
In my test [ ...VARCHAR.TIMESTAMP] :
- First fetch should return data. ( But I get the error )
- Second fetch should return 100L

----
I run "isc_stmt.011.select.VARCHAR.TIMESTAMP" with embedded 2.1.0.17798 and get same error

[08.09.2008 19:55:10] ERROR: [isc.stmt|isc_stmt.011.select.VARCHAR.TIMESTAMP] Fetch Statement
Dynamic SQL Error
SQL error code = -303
arithmetic exception, numeric overflow, or string truncation

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 11, 2008

Modified by: @asfernandes

Version: 2.5 Alpha 1 [ 10224 ]

Version: 2.0.4 [ 10211 ]

Version: 2.1.0 [ 10041 ]

Version: 2.5 Initial [ 10260 ]

Version: 2.0.3 [ 10200 ]

Version: 2.0.2 [ 10130 ]

Version: 2.0.1 [ 10090 ]

Version: 2.0.0 [ 10091 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 11, 2008

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 8, 2009

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 19, 2016

Modified by: @pavel-zotov

QA Status: No test

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