[MDEV-26515] query with condition on date type column on a view with order by on the date column return no row Created: 2021-08-31  Updated: 2021-09-01  Resolved: 2021-09-01

Status: Closed
Project: MariaDB Server
Component/s: N/A
Affects Version/s: 10.4.12
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Marc Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 1
Labels: None
Environment:

Red Hat 8


Attachments: Text File tablesDDL.txt     Text File view_NO_order_by.txt     Text File view_order_by.txt    

 Description   

After upgrading from 10.2 to 10.4 we have a view not returning data when using condition on the date type colum but the same queyr on the same view return rows on 10.2. We have trim down the code of the view as much as possible to provide the information. We have found out that the order by at the end of the view definition makes a difference.

The file view_order_by.txt contains the code of the view with query and analyze plan with the order by clause working on 10.2 but not 10.4.

The file view_NO_order_by.txt contains the code of the view with query and analyze plan without the order by clause working on 10.4.

The file tablesDDL.txt containt tables DDL used in the view.

SQL_MODE used is ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Marc



 Comments   
Comment by Alice Sherepa [ 2021-09-01 ]

I repeated this bug on 10.4.12, but the latest 10.4 returns the expected rows. I was not searching when exactly the issue was fixed, but I hope it will be fine for you to upgrade to the latest version (10.4.21)

Generated at Thu Feb 08 09:45:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.