Issue Details (XML | Word | Printable)

Key: CORE-3233
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Paul Vinkenoog
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

LIKE, STARTING and CONTAINING fail if second operand >= 32K

Created: 13/Nov/10 12:38 AM   Updated: 16/May/12 09:57 AM
Component/s: Engine
Affects Version/s: 2.1.3, 2.5.0
Fix Version/s: 2.5.1, 2.1.5, 3.0 Alpha 1

Time Tracking:
Not Specified

Issue Links:
Relate
 

Planning Status: Unspecified


 Description  « Hide
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.


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 02/Feb/11 10:43 AM - edited
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.