- Hardware parameters:
- OS type:
- Others:
From 2nd execution onward, NULL values stored as empty ByteJson (IS NULL=false, 0 bytes). Reads panic: "ByteJson.Unmarshal index out of range [0] with length 0"
## Steps to Reproduce
CREATE TABLE test_ps (id INT, meta JSON);
PREPARE stmt FROM 'INSERT INTO test_ps (id, meta) VALUES (?, ?)';
SET @a=1, @b=NULL; EXECUTE stmt USING @a, @b;
SET @a=2, @b=NULL; EXECUTE stmt USING @a, @b;
DEALLOCATE PREPARE stmt;
SELECT id, meta IS NULL FROM test_ps;
-- 1=true, 2=false (corrupted)
SELECT CAST(meta AS CHAR) FROM test_ps;
-- ERROR: ByteJson.Unmarshal panic
Is there an existing issue for the same bug?
Branch Name
3.0-dev, main
Commit ID
latest
Other Environment Information
Actual Behavior
Actual Behavior
From 2nd execution onward, NULL values stored as empty ByteJson (IS NULL=false, 0 bytes). Reads panic: "ByteJson.Unmarshal index out of range [0] with length 0"
Expected Behavior
No response
Steps to Reproduce
Additional information
No response