[MDEV-12886] Different data type and default for INT and BIGINT columns in a VIEW for a SELECT with ROLLUP Created: 2017-05-24 Updated: 2017-05-27 Resolved: 2017-05-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Views |
| Affects Version/s: | 10.0, 10.1, 10.2, 10.3 |
| Fix Version/s: | 10.3.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | datatype | ||
| Issue Links: |
|
||||||||
| Description |
|
I run this script:
Notice, it reports the data type of v1.a as BIGINT for some reasons. The expected data type is INT. Now I change the data type from int to bigint:
Notice, field "a" has different default:
Looks suspicious. The difference happens because int does not pass this condition, while bigint does:
See sql_select.cc, create_tmp_field(). |
| Comments |
| Comment by Alexander Barkov [ 2017-05-25 ] |
|
Pushed to bb-10.2-ext. Reporting 5 hours, as it took around 15 hours for a joint patch fixing 3 bugs:
|