[MDEV-21201] No records produced in information_schema query, depending on projection Created: 2019-12-03 Updated: 2023-11-27 Resolved: 2020-07-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Information Schema |
| Affects Version/s: | 10.4.10, 10.3, 10.4 |
| Fix Version/s: | 10.3.24, 10.4.14, 10.5.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Lukas Eder | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
Create a table with a check constraint:
Now consider this query, which should produce the above check constraint:
It does not produce any results. Add two columns to the projection and ta-dah, we get the desired output:
|
| Comments |
| Comment by Elena Stepanova [ 2019-12-03 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the report and test case. Reproducible as described on 10.3-10.5. Not reproducible on 10.2. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-04-29 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Something wrong with USING, but it is not just conversion:
| ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-04-30 ] | ||||||||||||||||||||||||||||||||||||||||||
|
in JOIN_TAB::calc_used_field_length I see very strange field referecces with 0 pack_length inherited from Field_null... | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-05-11 ] | ||||||||||||||||||||||||||||||||||||||||||
|
create_schema_table() creates Item_empty_stringwith maximum length 0 and following code creates Field_null for the Item
| ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-05-11 ] | ||||||||||||||||||||||||||||||||||||||||||
|
It looks like the problem caused by e2664ee8362a94335df06edfc86936ff263d6dc0 | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-05-11 ] | ||||||||||||||||||||||||||||||||||||||||||
|
mark_all_fields_used_in_query() take into acount all Items, but it do not take into account USING fields which have no items yet | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-05-12 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Check natural join, probably we have probem with it | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-05-12 ] | ||||||||||||||||||||||||||||||||||||||||||
|
probably we have to have to allow matching with other table fields names in case of natural join | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-07-08 ] | ||||||||||||||||||||||||||||||||||||||||||
|
gin/bb-10.3- In case of USING check also join field list to mark fields as used. In case of NATURAL JOIN mark all field (one table can not be opened IMHO table should be checked for used fields and filled after prepare, | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2020-07-28 ] | ||||||||||||||||||||||||||||||||||||||||||
|
for now, please, just add something like
that is, disable the | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-07-31 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Temporary patch (not so efficient) pushed to 10.3. Proper fix will go later (next release). |