-
-
Notifications
You must be signed in to change notification settings - Fork 232
CHAR_TO_UUID on column with index throws expression evaluation not supported Human readable UUID argument for CHAR_TO_UUID must be of exact length 36 [CORE5062] #5349
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
Comments
Commented by: @mrotteveel Test case is available in Branch_2_2: FirebirdSQL/jaybird@fe64e29 |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 RC2 [ 10048 ] Fix Version: 2.5.6 [ 10721 ] |
Commented by: @pavel-zotov > The error does not occur if the uuid column does not have an index (. . .), Can't catch error using parametrized ES and running script in ISQL with "-ch utf8" switch for connect: recreate table test_uuid ( set term ^; What I've missed ? |
Commented by: @asfernandes EXECUTE STATEMENT AFAIR uses varchar descriptors even for char columns. I think you can have some success (failure) with this internal command: ----------- |
Commented by: @pavel-zotov ASF> I think you can have some success (failure) with this internal command I've tried, on WI-V3.0.0.32266. C:\MIX\firebird\fb30>isql /3333:e30 UUID 35374632423843372D453144382D3442 Exception "String too long" is expected: I gave 'human readable' string with length = 36 rather than required argument with type = 'character set octets'. But: why this argument (with invalid length) successfully passed ? Another attempt, with enclosing parameter into CHAR_TO_UUID() function (tried on official RC-1, i.e. build 32136): C:\MIX\firebird\fb30tmp>isql /3309:e30 UUID 57F2B8C7E1D84B619086C66D1794F2D9 No exception occured though it should be here. Also, no exception will be in case of trying in Python.
|
Commented by: @sim1984 In my opinion this fix something broken. Create a database with UTF-8 encoding. We are trying run any query in IBExpert, for example, select count (*) Then we obtain an error. The trace shows the following Statement 63: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2016-01-05T19: 22: 46.7730 (10380: 000000003A100040) ERROR AT JStatement :: openCursor Apparently IBExpert can not perform some internal queries for metadata extraction. Previously, this did not happen. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Done with caveats Test Details: Could not reproduce ticket issue on x86. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @mrotteveel
Assuming a table:
create table t_uuid (
uuid CHAR(16) CHARACTER SET OCTETS PRIMARY KEY,
datavalue integer
)
Using connection character set UTF8 and executing the query SELECT datavalue from t_uuid where uuid = char_to_uuid(?) with a UUID (eg 57F2B8C7-E1D8-4B61-9086-C66D1794F2D9)
will throw GDS Exception. 335544606. expression evaluation not supported Human readable UUID argument for CHAR_TO_UUID must be of exact length 36
See also http://stackoverflow.com/questions/34532398/firebird-char-to-uuid-failed-with-gds-exception-335544606
The error does not occur if the uuid column does not have an index (that is: it is not a primary, unique or foreign key, or has no normal index), nor when the connection character set is a single byte character set. The bind description received by Jaybird is the same for the working and failing case.
This error has been been introduced in 2.5.4, it is not reproducible with Firebird-2.5.3.26780-0_x64 or earlier.
This is reproducible using Jaybird (note: run from the TestFBPreparedStatement class in Jaybird Branch_2_2) with:
Workaround is to explicitly cast the parameter to a character set like UTF8 or ASCII. Note that from the perspective of Jaybird there is no difference in the received bind description.
Commits: a5c4a29 e2c8f22 3ab690b dcdec26 210920d 964f91b 30e729d 7638ad5 FirebirdSQL/jaybird@fe64e29 FirebirdSQL/fbt-repository@feab8d0 FirebirdSQL/fbt-repository@cc54cec FirebirdSQL/fbt-repository@1689fb2 FirebirdSQL/fbt-repository@17ca9ae FirebirdSQL/fbt-repository@a561042 FirebirdSQL/fbt-repository@bf6b9c8
====== Test Details ======
Could not reproduce ticket issue on x86.
Checked on: WI-V2.5.4.26856, WI-V3.0.0.31948 (Python = 2.7 x86, fdb = 1.5).
The text was updated successfully, but these errors were encountered: