[MDEV-18685] mysql_list_fields() returns DEFAULT 0 instead of DEFAULT NULL for view columns Created: 2019-02-21 Updated: 2019-04-02 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients, Views |
| Affects Version/s: | 5.5, 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
I run this script:
and then execute this client program:
It produces the following output:
Notice, Default is erroneously displayed as 0. The expected result is NULL. The problem resides in Item_ident_for_show::val_int() which does not check field->is_null() before calling field->val_int(). |