Issue Details (XML | Word | Printable)

Key: CORE-3427
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: ceeam
Votes: 0
Watchers: 2
Operations

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

Server crashing with UTF8 blobs

Created: 04/Apr/11 09:57 AM   Updated: 27/Mar/14 12:32 PM
Component/s: Charsets/Collation, Engine
Affects Version/s: 3.0 Initial, 2.5.0
Fix Version/s: 2.5.1, 3.0 Alpha 1

Time Tracking:
Not Specified

Environment: FreeBSD, x64, SuperServer, embedded (not system-wide) ICU
Issue Links:
Relate
 

Planning Status: Unspecified


 Description  « Hide
I have "BLOB SUB_TYPE 1 SEGMENT SIZE 80 CHARACTER SET UTF8" (CI_AI collation) fields in my DB. When trying to "select * from tbl where blob_field like '%test%'" the server reliably crashes. Doesn't happen with WIN1251 (for example) blobs or VARCHAR fields.

Yes, I know that queries like those are not effective/recommended, but that's not the point, I guess.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 04/Apr/11 03:05 PM
Cannot reproduce:

SQL> create table tbl (blob_field blob sub_type text character set utf8 collate unicode_ci_ai);
SQL> insert into tbl values ('test');
SQL> insert into tbl values ('TEST');
SQL> select * from tbl where blob_field like '%test%';

       BLOB_FIELD
=================
             8a:0
==============================================================================
BLOB_FIELD:
test
==============================================================================
             8a:2
==============================================================================
BLOB_FIELD:
TEST
==============================================================================


ceeam added a comment - 05/Apr/11 08:39 AM
Well, that depends on the data then:

server# ./isql -u sysdba -p xxxxxxxxx -ch win1251
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database '/data/fb/foo.fdb';
SQL> create table tbl (blob_field blob sub_type text character set utf8 collate unicode_ci_ai);
SQL> insert into tbl values ('крупнейший европейский журнал о компьютерах. Вышел на рынок компьютерных изданий с уникальной концепцией и предназначен для людей, которые интересуются компьютерами, Интернетом, средствами телекоммуникаций, аудио-, видео- и фототехникой. Каждые две недели читателям предлагаются новости индустрии, тесты оборудования и программ, обучающие курсы и практические советы. Издание интересно как новичкам, так и опытным пользователям.');
SQL> commit;
SQL> select * from tbl where blob_field like '%test%';

       BLOB_FIELD
=================
Statement failed, SQLSTATE = 08006
Error reading data from the connection.

Yep. Crashed and needs to be restarted.