mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Bug #30942: select str_to_date from derived table returns varying results
The function str_to_date has a field to say whether it's invoked constant arguments. But this member was not initialized, causing the function to think that it could use a cache of the format type when said cache was in fact not initialized. Fixed by initializing the field to false. mysql-test/r/type_date.result: Bug#30942: Test result mysql-test/t/type_date.test: Bug#30942: Test case sql/item_timefunc.h: Bug#30942: Initialized const_item to false
This commit is contained in:
parent
4a801dde7e
commit
f8f021fd6b
3 changed files with 24 additions and 1 deletions
|
|
@ -136,3 +136,13 @@ d dt ts
|
|||
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00
|
||||
2001-11-11 2001-11-11 00:00:00 2001-11-11 00:00:00
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a INT
|
||||
);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SELECT str_to_date( '', a ) FROM t1;
|
||||
str_to_date( '', a )
|
||||
0000-00-00 00:00:00
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
|
|
@ -136,3 +136,16 @@ insert into t1 values (9912101,9912101,9912101);
|
|||
insert into t1 values (11111,11111,11111);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #30942: select str_to_date from derived table returns varying results
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a INT
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
|
||||
SELECT str_to_date( '', a ) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue