Bug #116414 BOLB type or operation
Submitted: 19 Oct 6:27 Modified: 19 Oct 15:05
Reporter: John Jove Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S1 (Critical)
Version:8.4.2, 8.0.40 OS:Ubuntu
Assigned to: CPU Architecture:Any

[19 Oct 6:27] John Jove
Description:
what you did:

The OR operation of BOLB type data stored in byte type cannot get the correct answer

Byte Data stored in type BOLB should themselves or themselves be 0, as in b'Binary Data'.

CREATE TABLE t1 (

c1 BLOB

);

INSERT INTO t1 (

c1

) VALUES

(

NULL

),

(

'Binary Data'

);

SELECT c1 | c1 AS C1 FROM t1;

what you wanted to happen:

The SELECT query should return ((None,), (0,))

what actually happened:

SELECT actually returns ((None,), (b'Binary Data',))

How to repeat:
CREATE TABLE t1 (
    c1 BLOB
);
INSERT INTO t1 (
    c1
) VALUES
(
    NULL
),
(
    'Binary Data'
);
SELECT c1 | c1 AS C1 FROM t1;
[19 Oct 15:05] MySQL Verification Team
Hello John,

Thank you for the report and test case.
Verified as described.

regards,
Umesh