[MDEV-12854] Synchronize CREATE..SELECT data type and result set metadata data type for INT functions Created: 2017-05-20 Updated: 2017-05-21 Resolved: 2017-05-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Fix Version/s: | 10.3.1 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | datatype, refactoring | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
A set of bugs, related to a wrong result set metadata, were fixed recently: The same problem exists for INT result functions:
Notice, LENGTH() reports itself as LONGLONG data in the result set metadata, however in fact create an INT(10) column in CREATE..SELECT. Under terms of this tasks will fix the majority of Item_func_int descendants, so the result set metadata matches CREATE..SELECT. This will also positively affect on aggregation for UNION or CASE and CASE abbreviations, as the current way of data type detection using max_length Only functions creating a BIGINT column in CREATE..SELECT will report LONGLONG in metadata. Note, later we'll possibly change LONG to more precise type codes (e.g. TINY, SHORT, INT24). But this will be done in a separate task. The intent for now is to make type_handler() return a correct pointer, to make create_tmp_field() and create_field_for_create_select() call tmp_table_field_from_field_type(), to get rid of Item::create_tmp_field() soon. |
| Comments |
| Comment by Alexander Barkov [ 2017-05-20 ] |
|
Pushed to bb-10.2-ext |