Commit 9dc1353
Gleb Shchepa
Backport of fix to bug #33629 into mysql-next-mr-bugfixing.
Bug #33629: last_day function can return null, but has 'not null' flag set for result
LAST_DAY and MAKEDATE functions are documented as
returning NULL value, but actually they was implemented
as returning NOT NULL typed values.
That caused a confusing error "ERROR 1048 (23000): Column
'...' cannot be null" on queries like:
SELECT 1 FROM (SELECT LAST_DAY('0')) a;
--BZR--
revision-id: [email protected]
property-branch-nick: mysql-next-mr-bugfixing
property-file-info: ld7:file_id70:sp1f-func_sapdb.result-20030623075631-kd3o45rwsfzikxjuk7r2deumuhaphbn77:message36: Updated test case for bug #33629.
property-file-info: 4:path30:mysql-test/r/func_sapdb.resulted7:file_id69:sp1f-func_time.result-20001228015633-voo54ouzgwctcbmk22zwazoev5os5o4x7:message36: Updated test case for bug #33629.
property-file-info: 4:path29:mysql-test/r/func_time.resulted7:file_id69:sp1f-type_date.result-20001228015634-drbo6443s5wzxlf3enjz3qt43ttjf6ik7:message34: Added test case for bug #33629.
property-file-info: 4:path29:mysql-test/r/type_date.resulted7:file_id67:sp1f-type_date.test-20001228015637-6hhkz7fj6xpjxak4s3sq7ohgddycrhvz7:message34: Added test case for bug #33629.
property-file-info: 4:path27:mysql-test/t/type_date.tested7:file_id68:sp1f-item_timefunc.h-19700101030959-o34ypz6ggolzqmhgsjnqh6inkvgugi467:message338: Bug #33629: last_day function can return null, but has 'not null' flag set for result
property-file-info:
property-file-info: 1. The Item_func_makedate::fix_length_and_dec method
property-file-info: has been modified to declare MAKEDATE() as a function
property-file-info: returning nullable value.
property-file-info: 2. The Item_func_last_day::fix_length_and_dec method
property-file-info: has been overloaded for the same purpose.
property-file-info: 4:path19:sql/item_timefunc.hee
testament3-sha1: 00121556ee1f79e071021de9bac326477a1f73921 parent e13305b commit 9dc1353
5 files changed
Lines changed: 48 additions & 2 deletions
File tree
- mysql-test
- r
- t
- sql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
817 | | - | |
| 817 | + | |
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
| 874 | + | |
874 | 875 | | |
875 | 876 | | |
876 | 877 | | |
| |||
1025 | 1026 | | |
1026 | 1027 | | |
1027 | 1028 | | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1028 | 1034 | | |
0 commit comments