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
LIKE, STARTING and CONTAINING fail if second operand >= 32K [CORE3233] #3605
Comments
Modified by: @paulvinkdescription: create table blobz (zin blob sub_type 1); The following query: select * from blobz where zin like cast(cast('woord' as char(32766)) as blob sub_type 1) || '!' works, and returns a set which may or may not be empty, depending on what's in the table. Now we add one more char: select * from blobz where zin like cast(cast('woord' as char(32767)) as blob sub_type 1) || '!' and we get: 335544321 - arithmetic exception, numeric overflow, or string truncation This happens with LIKE, STARTING and CONTAINING. => create table blobz (zin blob sub_type 1); The following query: select * from blobz where zin like cast(cast('woord' as char(32766)) as blob sub_type 1) || '!' works, and returns a set which may or may not be empty, depending on what's in the table. Now we add one more char: select * from blobz where zin like cast(cast('woord' as char(32767)) as blob sub_type 1) || '!' and we get: 335544321 - arithmetic exception, numeric overflow, or string truncation This happens with LIKE, STARTING and CONTAINING. |
Commented by: @dyemanov Addition: if the BLOBZ.ZIN column is created without any explicit or implicit character set specified (i.e. NONE), then both queries throw: conversion error from string "BLOB". In other words, the second argument cannot be a blob (of any length) in this case. |
Modified by: @dyemanovassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5.1 [ 10333 ] Fix Version: 3.0 Alpha 1 [ 10331 ] Fix Version: 2.1.5 [ 10420 ] |
Modified by: @pmakowskistatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @paulvink
Is related to QA283
create table blobz (zin blob sub_type 1);
commit;
/* insert stuff - or not... */
The following query:
select * from blobz where zin like cast(cast('woord' as char(32766)) as blob sub_type 1) || '!'
works, and returns a set which may or may not be empty, depending on what's in the table.
Now we add one more char:
select * from blobz where zin like cast(cast('woord' as char(32767)) as blob sub_type 1) || '!'
and we get: 335544321 - arithmetic exception, numeric overflow, or string truncation
(in 2.5, the following is added: blob truncation when converting to a string: length limit exceeded)
This happens with LIKE, STARTING and CONTAINING.
Commits: aafa381 1fc093e 3447e70 7e182bc a82fbb6 55f5ce3
The text was updated successfully, but these errors were encountered: