From: Karel R. (JIRA) <tr...@fi...> - 2016-09-22 19:15:15
|
OVERLAY with binary blob - data corruption ------------------------------------------ Key: CORE-5356 URL: http://tracker.firebirdsql.org/browse/CORE-5356 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 3.0.0 Environment: Firebird 3.0.0 64bit, Windows 10 Pro 64 bit CZ Reporter: Karel Rys Hello, I have a table like this: CREATE TABLE Users ( ... Prava blob, ... ); Records in this table now have char_length of Prava in range 399 to 403. It stores binary zeroes and ones (user rights in our application). When I run this: SELECT char_length(a.Prava) as ActualLength, ascii_val(a.Prava) as NewValue1, ascii_val(substring(a.Prava FROM 1 FOR 1)) as NewValue2, ascii_val(OVERLAY( a.Prava PLACING ascii_char(1) FROM 200 for 1 )) as NewValue3, ascii_val(substring(OVERLAY( a.Prava PLACING ascii_char(1) FROM 200 for 1 ) FROM 1 FOR 1)) as NewValue4, a.* FROM Users a I get: ActualLength, NewValue1, NewValue2, NewValue3, NewValue4, ... 403, 1, 1, 46, 46, ... 402, 1, 1, 1, 1, ... 399, 0, 0, 0, 0, ... 402, 1, 1, 1, 1, ... ... It seems that OVERLAY returns wrong data for the first record - there should not be any "46". Kind regards, Karel Rys -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |