RQG: Virtual persistent columns not computed properly for default NULL values
Bug #603186 reported by
Philip Stoev
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Igor Babaev |
Bug Description
In the example below, the virtual persistent column does not agree that the result from INTERVAL ( NULL , NULL ) is -1 . If the computation is executed without the aid of a virtual column, or if the virtual column is not persisted, the result is correct.
CREATE TABLE t1 ( f1 CHAR(32), f2 CHAR(32), v1 INT AS ( INTERVAL( f2 , NULL ) ) PERSISTENT );
INSERT INTO t1 ( f1 ) VALUES ( NULL );
SELECT INTERVAL(NULL , NULL), v1, ( INTERVAL( f2, NULL ) ) FROM t1;
summary: |
- Virtual persistent columns not computed properly for default NULL values + RQG: Virtual persistent columns not computed properly for default NULL + values |
Changed in maria: | |
status: | New → Fix Committed |
importance: | Undecided → High |
assignee: | nobody → Igor Babaev (igorb-seattle) |
Changed in maria: | |
milestone: | none → 5.2 |
Changed in maria: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Here is another example:
--disable_ abort_on_ error
DROP TABLE t1;
DROP TABLE t2;
CREATE TABLE t1 ( f1 CHAR(32) NOT NULL, v1 INT AS ( f1 ) PERSISTENT );
INSERT INTO t1 () VALUES ();
CREATE TABLE t2 ( f1 CHAR(32) NOT NULL, v1 INT AS ( f1 ) VIRTUAL );
INSERT INTO t2 () VALUES ();
SELECT f1, v1 FROM t1;
SELECT f1, v1 FROM t2;