[MDEV-13240] Wrong warning with MAX(datetime_field) OVER (...) Created: 2017-07-04 Updated: 2017-09-19 Resolved: 2017-07-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This script:
returns a correct result:
but causes a redundant warning in bb-10.2-ext and 10.3:
The warning looks wrong. There should not be any warnings. The problem is not repeatable in 10.2. The problem happens because Item_window_func::save_in_field() works differently in bb-10.2-ext comparing to 10.2:
After a discussion with Vicentiu, it was decided to fix Item_window_func::val_xxx() to return NULL (instead of an "empty" value, such as 0 for numbers and '' for strings) when force_return_blank is set. |
| Comments |
| Comment by Vicențiu Ciorbaru [ 2017-07-04 ] |
|
Ok to push |
| Comment by Alexander Barkov [ 2017-07-04 ] |
|
Pushed to bb-10.2-ext. |