You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
It seems that OVERLAY returns wrong data for the first record - there should not be any "46".
Kind regards,
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 just tested on Firebird 2.5.5 64bit running on Centos 7, 64 bit.
The same querry returns 46 in ALL fields NewValue1, NewValue2, NewValue3, NewValue4 in ALL records.
Submitted by: Karel Rys (vandrovnik)
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".
The text was updated successfully, but these errors were encountered: