Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
Description
Test:
create view v1 as select quote(NULL); |
select * from v1; |
drop view v1; |
Actual result:
NU
|
Expected result:
NULL |
Attachments
Issue Links
- is duplicated by
-
MDEV-31587 quote(NULL) returns incorrect result with cursor protocol
-
- Closed
-
- is part of
-
MDEV-27691 make working view-protocol
-
- Closed
-
- relates to
-
MDEV-27945 Select from view with multi-byte charsets gives incorrect result
-
- Open
-
-
MDEV-28585 Wrong result for view defined as SELECT ROW(1,2,3) = (SELECT 1,2,NULL)
-
- Open
-
-
MDEV-28649 json_array(false) in the definition of view return 0 instead of "true"
-
- In Review
-
-
MDEV-28652 SUBSTRING(str,pos,len) returns incorrect result in view (returns an empty string)
-
- Closed
-
-
MDEV-28659 View returns wrong value for big digits nuber
-
- Open
-
-
MDEV-28660 TRUNCATE(X,D) returns incorrect result in view
-
- Open
-
-
MDEV-28661 MIN(X) returns incorrect result in view
-
- Open
-
-
MDEV-28673 View returns different value for min(year) function
-
- Open
-
-
MDEV-28677 UDF returns wrong string value in view
-
- Open
-
-
MDEV-29524 "-0000000000000001" changes to "-1" in view definition, so type changes from bigint to int
-
- Open
-
-
MDEV-29525 CAST in view definition returns string instead of NULL on warning and gives incorrect round
-
- Open
-
-
MDEV-29526 ROUND(X,D) returns incorrect result in view when D>9
-
- Open
-
-
MDEV-29534 In view FROM_UNIXTIME adds .000000 in the result
-
- Open
-
-
MDEV-29647 ROW_NUMBER is not 0 for warnings in case without row in view
-
- Open
-
-
MDEV-33942 View cuts off the end of string with the utf8 character set in INSERT function
-
- Closed
-
-
MDEV-29552 LEFT and RIGHT with big value for parameter 'len' >0 return empty value in view
-
- Closed
-
-
MDEV-31587 quote(NULL) returns incorrect result with cursor protocol
-
- Closed
-
It looks like some type processing mismatch:
select quote(NULL);
quote(NULL)
NULL
explain extended select quote(NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select quote(NULL) AS `quote(NULL)`
create view v1 as select quote(NULL);
select * from v1;
quote(NULL)
NU
show create view v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select quote(NULL) AS `quote(NULL)` latin1 latin1_swedish_ci
explain extended select * from v1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00
2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 /* select#1 */ select 'NU' AS `quote(NULL)` from dual
drop view v1;
select quote(NULL);
explain extended select quote(NULL);
create view v1 as select quote(NULL);
select * from v1;
show create view v1;
explain extended select * from v1;
drop view v1;