mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
Bug#47669 Query showed by EXPLAIN EXTENDED gives different result from original query
Item_field::print method does not take into account fields whose values may be null. The fix is to print 'NULL' if field value is null.
This commit is contained in:
@@ -187,4 +187,16 @@ SET SESSION sql_mode=@old_sql_mode;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#47669: Query showed by EXPLAIN EXTENDED gives different result from original query
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (c int);
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
CREATE TABLE t2 (d int);
|
||||
INSERT INTO t2 VALUES (NULL), (0);
|
||||
EXPLAIN EXTENDED SELECT (SELECT 1 FROM t2 WHERE d = c) FROM t1;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
--echo End of 5.1 tests.
|
||||
|
Reference in New Issue
Block a user